I have the following hardware:
- Dot matrix printer: LX 300-II.
- Android device with Android version 4.2.2.
- Connection type: USB, Wi-FI, Bluetooth.
I have an Android Activity that create an invoice, so I want to print some text on printer. But I can't make it work.
I tried using USBManager with no success. Is there any way to achieve this?
I found a solution. It's the only way to make it works. USBManager cannot access to printer because driver is missing. So I tried with a WI-FI option.
You need some extra hardware here:
First of all you must configure your Print Server. I did it following this tutorial.
Now I have the Print Server pointing to my device (acting as Server) and waiting for any printer job.
What I did on my Xamarin.Android project?
Created an instance of a Socket class pointing to the Printer Server ;)
No Epson command needed (Ok some of them). The code is the following:
Now is working very fine.