I want to write an Android app which will do following in steps and I want you to help me find right APIs for them to speed up the process. The printer I am going to use supports ESC/POS protocols.
I found some APIs like this. I believe my problem is similar to this post
Plug one end of the USB cable into the USB port of the printer, and the other end into the female USB connector of an OTG adapter or cable. Then, plug the micro-USB end of the OTG adapter or cable into the micro-USB port of your mobile device, and wait for the system to recognize the printer.
✧ ESC command is a standard instruction set made by EPSON for needle printer, which has become an effective industrial standard of the control language of needle printers. ✧ ESC/POS printing command is a simplified version of ESC printing control commands.
I have been looking into this for a long time. There are almost no APIs out there, much less good APIs. The only one I have gotten to work so far is the Epson Android SDK.
This supports a number of wifi and bluetooth epson printers. With just a few lines of code, you can find the IP address of the printer you want to print with, and then add lines to the document to print. They also have a good sample app that has every kind of operation you might want to do.
You can manually write ESC commands, but it is very complecated. That is why things like JavaPos were developed, to attempt to abstract these details away. However, here is an Epson manual for ESC commands
UPDATE: the epson android sdk link is out of date. Here is an up-to-date link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With