Android Print Intent

I noticed several printer applications in the Android Market (HP, Epson, Canon, Kodak, Brother, Samsung, Lexmark, etc.) allowing the user to print LANs. But I could not find any general intention to use them.

Intent.ACTION_VIEW opens all applications that can view photos / doc, including many applications to increase productivity.

The HP iPrint app seems to have a unique intent line, but it doesn't work for any other print app. A.

Intent printIntent = new Intent("org.androidprinting.intent.action.SEND") ;

Any hint or workaround for invoking only print-related applications when creating an intent?

+6
source share
3 answers

There is no built-in way to find an application that responds to "print." Even if you know that the application can print to a printer, you have no guarantee that the application will accept incoming intentions. If he accepts incoming intentions, you should hope that he can accept the intention to print, and then hope that the developer has documented how to use the intent.

The best way to find the right app is Google for him.

+3
source

Not sure if you are still looking for a solution, but Google Cloud Print should fix this problem.

They have not tried to integrate the code yet, but it is configured as a Java source file compatible with all APIs and the corresponding XML layout for creating a "PrintDialog", which you can shoot with intent in your code. Right now they say that it works better with PDF documents and can process web image files, so you may need to embed third-party / open source PDF files into it depending on what you print.

You can also check Google Frequently Asked Questions as it discusses security issues and what is required for non-cloud printers to work with the service. (There seems to be a software key that users will need to install themselves.)

Hope this helps.

+2
source

Samsung Mobile Print supports intentions. You can print, scan or send a fax from your application using intentions.

For an example of web printing, see here .

+2
source

Source: https://habr.com/ru/post/911902/


All Articles