Rusty Well-Known Member Licensed User Longtime User Apr 11, 2013 #1 Is there an intent or interface to print from an app to the ePrint functions provided by the HP ePrint app? Thanks, Rusty
Is there an intent or interface to print from an app to the ePrint functions provided by the HP ePrint app? Thanks, Rusty
NJDude Expert Licensed User Longtime User Apr 11, 2013 #2 You can get the intents by running the app and reading the unfiltered logs. Upvote 0
Rusty Well-Known Member Licensed User Longtime User Apr 11, 2013 #3 Thanks. I have looked through the unfiltered logs and I guess I don't see what I need. I've found some Java code on the net, but have no idea how to port this to B4A. Any help would be greatly appreciated. Code: Copy Uri uri = Uri.fromFile( F ); Intent Intent = new Intent ("org.androidprinting.intent.action.PRINT"); Intent.setDataAndType( uri, "text/plain" ); context.startActivityForResult(Intent, 0); Upvote 0
Thanks. I have looked through the unfiltered logs and I guess I don't see what I need. I've found some Java code on the net, but have no idea how to port this to B4A. Any help would be greatly appreciated. Code: Copy Uri uri = Uri.fromFile( F ); Intent Intent = new Intent ("org.androidprinting.intent.action.PRINT"); Intent.setDataAndType( uri, "text/plain" ); context.startActivityForResult(Intent, 0);
Erel B4X founder Staff member Licensed User Longtime User Apr 11, 2013 #4 Try this: Code: Copy Dim i As Intent i.Initialize("org.androidprinting.intent.action.PRINT", "file://" & File.Combine(Dir, FileName)) 'make sure that the file is in the external storage i.SetType("text/plain") StartActivity(i) Upvote 0
Try this: Code: Copy Dim i As Intent i.Initialize("org.androidprinting.intent.action.PRINT", "file://" & File.Combine(Dir, FileName)) 'make sure that the file is in the external storage i.SetType("text/plain") StartActivity(i)
Rusty Well-Known Member Licensed User Longtime User Apr 11, 2013 #5 Thanks Erel! Works perfectly for a txt file. It does present the HP eprint control window which I'd rather have it just print it without the UI. I suppose that's an HP thing Can you advise how I might print a PDF and also an HTML file? Rusty Upvote 0
Thanks Erel! Works perfectly for a txt file. It does present the HP eprint control window which I'd rather have it just print it without the UI. I suppose that's an HP thing Can you advise how I might print a PDF and also an HTML file? Rusty
NJDude Expert Licensed User Longtime User Apr 11, 2013 #6 To do that you need to specify the MIME type, for example, if you want to print a pdf then do this: Code: Copy ... i.SetType("application/pdf") ... Upvote 0
To do that you need to specify the MIME type, for example, if you want to print a pdf then do this: Code: Copy ... i.SetType("application/pdf") ...
ViMeAv ICT Member Licensed User Longtime User Sep 23, 2014 #7 NJDude said: You can get the intents by running the app and reading the unfiltered logs. Click to expand... I want something the same with the Samsung Mobile Print App, where can I find the unfiltered logs? Upvote 0
NJDude said: You can get the intents by running the app and reading the unfiltered logs. Click to expand... I want something the same with the Samsung Mobile Print App, where can I find the unfiltered logs?