Recently we had a request to build an Android application that could monitor the downloads folder for lbl files and then print them on a Zebra mobile printer. The goal was to print lablel files to a Zebra RW series printer every time a new file was downloaded from the users web browser. The project allowed us to bridge a gap between web based mobile applications and a native application.
In this particular scenario, our team didn’t have any control over how the web based mobile application worked. The only control we had was over the native application on the Android tablet. The application needed a front end to setup the printer and monitor files that were found and it needed to keep running in the background when the user navigated to other applications on the device. We accomplished this utilizing and Android service class to monitor the downloads folder and then send broadcasts from the service back to the main activity that ran our applications UI.
Here is the basic workflow:
Running this process as a service allowed the user to navigate back to the web browser to find files and print automatically, removing the manual steps of locating the file on the SDCard and then printing. There are a number of scenarios where a worker might be off site and need to print remotely or on the go. This application helped enable that for our customer.
On a side note, check out Zebra mobile printers. We ended up utilizing a RW series. The print and spooling time were exceptionally fast.