Some years ago I implemented Barcode Scanner for BlackBerry 10 using Bluetooth SPP.
Now my customers switched to Android / iOS and I was looking HowTo implement Barcode Scanners.
BT SPP only works on Android, but not on iOS
Using Barcode Scanners as Keyboard you must be in a TextField. I tried to immediately hide the virtual keyboard - works, but there's a short flicker when Keyboard comes up and went away
Some Barcode Scanners have a special SDK - in most cases only for for Android
Then I found out that some vendors of Barcode Scanners (per ex. GeneralScan) also provide a BT LE API.
That's cool because BT LE works on Android and iOS
There's no default GATT profile for Barcode Scanners using BT LE, so you must know the custom Service UUID and Characteristic UUID
I added this for GeneralScan to my Qt BT LE Example App at github (https://github.com/ekke/ekkesBTLEexample)
As soon as Qt 5.12.1 is out I'll also update the Apps at Google Play Store and Apple App Store
Over all it works great:
connect to the BT LE Device
look for the Custom Service UUID
subscribe to NOTIFY Characteristic
Now you can listen to the Barcodes read from Barcode Scanner via BT LE without the need to have focus at Textfield.
I'm just implementing this into three Customer Apps on Android / iOS
When this is finished I'll create another Example at Github to scan EAN13 Barcodes and lookup for the product from web, so you have a kind of real-life-app-experience
Next step is to connect a mobile (Barcode) Printer via BT LE.
It's the same as for Barcode Scanner: no default GATT profile, but some vendors provide a BT LE API.
will implement Barcode printing for REGO and ZEBRA printers
will take some weeks, then I'll add to my BT LE example App and also create another example app to print a specific Barcode to rename a GeneralScan Barcode Scanner. My customer needs such a printer to make it easy to manage the Scanner Names to distinguish them. (In the morning there are 20 employees connecting their Android Phone to Barcode Scanner)
Most difficult part to implement BT LE Barcode Scanners / Mobile Printers was to get the infos about the custom Service UUIDs and Characteristic UUIDs and How data was sent to / read from BT LE device. Vendors have SDKs for native Android and native iOS, but I don't want to use them because I want to implement all in one x-platform Qt BT LE App with pure C++/QML ;-)