Android Question Intent to print/share pdf via - com.hp.printercontrol HP Smart (HP AiO Remote)

scsjc

Well-Known Member
Licensed User
Does anyone know any INTENT CODE to print/share a PDF/JPG via com.hp.printercontrol "HP Smart (HP AiO Remote)"

I used this code before, but it stopped working with new versions of android.
B4X:
Dim Intent1 As Intent
Intent1.Initialize("org.androidprinting.intent.action.PRINT", Starter.Provider.GetFileUri(filename))
Intent1.SetType("text/plain")
StartActivity(Intent1)

'i.Initialize("org.androidprinting.intent.action.PRINT", "file://" & File.Combine(Dir, FileName)) 'make sure that the file is in the external storage
 
Last edited:

DonManfred

Expert
Licensed User
but it stopped working with new versions of android
file:// Uris are no longer allowed. You need to use FileProvider.

 
Upvote 1

scsjc

Well-Known Member
Licensed User
file:// Uris are no longer allowed. You need to use FileProvider.

Correct the code does not work because of the "uris". And new versions of android not work with application com.hp.android.print.

So I wanted to update the code and see if the current HP software "com.hp.printercontrol" can be used directly via intent.
 
Upvote 0

DonManfred

Expert
Licensed User
Correct the code does not work because of the "uris". And new versions of android not work with application com.hp.android.print.
How do you know it does not work any longer? Have you tried to change file://-Uri to use FileProvider?
So I wanted to update the code and see if the current HP software "com.hp.printercontrol" can be used directly via intent.
Even if it probably would not work with file://
You need to use FileProvider here too.
 
Upvote 0

scsjc

Well-Known Member
Licensed User
How do you know it does not work any longer? Have you tried to change file://-Uri to use FileProvider?

Even if it probably would not work with file://
You need to use FileProvider here too.

The problem is that the application https://play.google.com/store/apps/details?id=com.hp.android.print is not available in the playstore for the new versions of android, i think is not compatible on android +9 ... And it does not allow to install directly

If I'm not wrong... This intent ... org.androidprinting.intent.action.PRINT ... worked through this application
The problem is, I don't have an HP to test
 
Upvote 0

DonManfred

Expert
Licensed User
Currently I am already using FileProvider and it works for all the other uses I have.
Sounds like a problem in the printer app then.
The problem is that the application https://play.google.com/store/apps/details?id=com.hp.android.print is not available in the playstore for the new versions of android, i think is not compatible on android +9
So I wanted to update the code and see if the current HP software "com.hp.printercontrol" can be used directly via intent.
You need to check the dokumentation if this app provides an Intent to print. And if it provides; which one.
Maybe contact the Author.
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Sounds like a problem in the printer app then.
I think the same

You need to check the dokumentation if this app provides an Intent to print. And if it provides; which one.
Maybe contact the Author.

this is the problem, I have not found anything on the web that talks about "INTENTS" documentation using the new hp application
I think I'll send a message to see if they tell me something.

Thansk a lot :)
 
Upvote 0
Top