Saturday 16 March 2013

Barcode Scanner Demo

This simple app demonstrates one of many applications for USB keyboard class. Generally it is no different from any other basic barcode scanner app, however it is able to use InputStick to emulate USB keyboard and use it to type scanned codes. For example: it can type scanned codes directly into spreadsheet application (Calc/Excel). There is no need to install any programs or drivers on PC, just plug InputStick into USB port. What's also important it will work with any OS (Windows/Linux/MacOS/Android etc). App uses ZXing library for scanning barcodes/QR-codes. Now a quick overview:

Main activity.

In Main activity there are four buttons: "Scan" to scan barcode/QR code, "Type" to type result, "Connect" to initiate connection to InputStick device and finally "Settings" to open Settings activity.

Settings activity

Here we can configure applications behaviour. I think checkboxes are pretty much self explanatory. OK, lets see how it works. After pressing "Scan" button we can use phone to scan a code, which will then appear below "Scan" button. We can use "Type" button to type it using InputStick.

After scanning code.

Spreadsheet application (Open Office Calc).


  1. Good article. I can easy find a bar code scanner on websites, but I want to integrate barcode scanner in excel, hope you can share me with a free resource. Thanks a lot.

    1. Can you give me some more details? What platform/device should send data to InputStick? And what device will act as USB host?

    2. I've already found such a resource on google, but still thank you a lot.