So, you want to develop your big Point Of Sale(POS) solution on android but don’t know how to print the receipts. You have a few options:
- Make a centralized mobile web application, reachable on wifi and use your tablets to take orders and print the receipts at the bar.
- Use some kind of a Windows Mobile/CE handheld device with a printer
- Make an Android app and print via Bluetooth
Due to the requirements of the project I have been working on, I have made a solution somewhere between 1 and 3, using Ruby on Rails for back end administration and api, and using Android tablets for billing. As for the printing of the receipts, the only POS printer we could find on our market with Bluetooth capabilities was Bixolon SPP-R200 so I decided to use it. And the Bixolon support guy Jörg from Germany was really helpful, and sent me the android api so all I had to do was include one jar file and write a class for handling the printer. You also get the whole example application, with every api call available.
For my needs, and future compatibility, I first integrated everything into the activity, yes silly of me, but then I extracted it into a class and also created a printing interface which my app now uses, and it can be used across multiple apps very easily. First a basic printing interface:
And I implemented the class using the Bixolon Api here:
All that is remaining in your activity is to declare a variable of the Printer type and instantiate a new BixolonPrinter class.
I chose this path because one company that is in mobile solutions in Croatia heard a presentation about the application, and decided to lend us a Zebra mobile POS printer(don’t really know which model), to implement it into the app.