Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android print framework - Silent print custom pdf to predetermined printer

I am developing a POS application for android. What i need to do is print the bill when you click on a button. The print needs to happen silently to a predetermined printer without any interaction with the app. The printer will be found with its IP address set up in code. The connection should happen true wifi or bluetooth (probably wifi).

What i have tried so far is use the android print framework (In Android 4.4 (API level 19) ), but it seems to be stuck to the gui (Again i dont want any gui for the print, it just needs to happen). I couldn't find the option to set the printer IP true code.

I have followed a simple tutorial to create the code that i have right now. Here is a link to it: http://www.techotopia.com/index.php/An_Android_Custom_Document_Printing_Tutorial

So to recap, i need my custom Android POS app to print bills(or just anything for starters) to a predetermined printer that i set up in code.

It seems that Rongta pos printers has a android sdk. I guess other manufacturers have to have one as well for their printers.

like image 859
Ivan Šimović Avatar asked Sep 02 '25 16:09

Ivan Šimović


1 Answers

AFAIK you cannot silent print the document in Android. There is an open issue on AOSP issue tracker. https://code.google.com/p/android/issues/detail?id=160908.

like image 101
Anirudha Mhase Avatar answered Sep 05 '25 06:09

Anirudha Mhase