20

I have been doing alot of research today, about whether or not it's possible to implement NFC printing in an Android app. We have a client who has an HP printer with the NFC feature, and want to use that in an app we created earlier, instead of Cloud printing. What we want is, to be able to set some options regarding the print itself, like orientation and scale etc., automatically, so we can just hold our Android device in front of the printer.

Use case:

  1. Press print button in Android app
  2. Create bitmap
  3. Show dialog saying: "Hold phone close to the printers NFC reader"
  4. The printer then prints the bitmap, without further user interaction.

The idea here is, as mentioned above, that we can se some print options in the NFC message.

Have anyone done anything like this before, and is it even possible to use a custom implementation of NFC printing on Android yet?

Another solution would be to use HP's own feature, called EPrint. I have created a test version, where we just create the bitmap and then create an intent to the EPrint application (the user must have the HP EPrint app installed...).

The EPrint app then finds the right printer, by itself, and then the user must set some printing options before pressing "print". It doesnt seem like it's possible to adjust any printer options with the intent (bundle), but maybe it just lacks documentation?

The above implementation is not too bad, because the client doesn't mind having the HP EPrint app installed. But the NFC feature would be more preferable.

Is any of this possible?

Teilmann
  • 2,146
  • 7
  • 28
  • 57
  • 3
    Android 4.4 and higher support printing. However, the details of how the PDF generated for printing actually gets printed is up to the printer manufacturer. This includes how that PDF is transferred over to the printer. Hence, this is not an "Android" thing; this is an "HP printer support on Android" thing, and you will need to ask HP what it supports for its various printers for its Android printing plugin. – CommonsWare Nov 18 '15 at 13:09
  • @CommonsWare Yes, that is what i suspected, but i just wanted to see if anyone have ever done anything like it before. Thanks for the quick answer – Teilmann Nov 18 '15 at 13:10

1 Answers1

1

It appears that the hp EPrint app supports nfc printing without option selection. This video demonstrates how to print through EPrint using nfc. If you export the document to the app, it will show preview mode. When the preview is shown, you simply place the phone on the printer's nfc chip and it should automatically print with no additional options or dialogue.

Defalt
  • 29
  • 4