From this tutorial you will learn how to print with POS printer from android app. Sometimes you might need to print something from your android app. Yes, it's challenging job to add printing feature but it is not impossible. Recently I've added printing feature in one of my native android apps. I needed to print money receipt after each sales. So I bought a POS printer because POS printer is widely used to print receipt. The POS printer should have blueetooth or Wifi connectivity option. In this tutorial I will show you how to connect a POS printer through bluetooth connection.
- A POS printer. I have used RONGTA RPP200. http://www.rongtatech.com/products-look-58.html.
- RTDriver.jar - this API file is provided by RONGTA. RONGTA is the company from whom I bought the printer. This API makes my priting task much easier. It is very easy to set alignment, line spacing, font enlargement, line feeding and so on. Sending printing command to the printer is also very easy with this API.
The project contains two user interfaces. One for connecting with printer and for printing sales receipt.The other one is for scanning the available bluetooth devices. I've put as many comments as possible in the project. I hope you will easily understand the code if you have prior knowledge on android development.