1

I have an Android app that requires the user to scan and record some barcodes. I am using the SocketMobile Bluetooth Barcode Scanner series 7.

I want to be able to process a scan of a barcode regardless of which activity or fragment the user is currently busy on (I'm just recording each scan in a list). For this reason I believe (maybe incorrectly?) that simply connecting the scanner in HID mode is not sufficient since that will require a user to navigate to a specific field and then perform their scanning. Maybe this assumption is incorrect?

From the examples on github it looks like in order to achieve this simple functionality I will have to implement a full scanning application including the implementation of pairing, etc.

Is it possible to simply pair this scanner in HID mode via Android or to pair it in SPP mode using another existing app and then simply have my app be able to receive barcode reads from this scanner? What is the simplest way to implement scanning functionality in Android? I only care about receiving the data from the scanner anywhere in my app. I don't want to be burdened with the pairing or management of the bluetooth connection.

Stanley
  • 5,261
  • 9
  • 38
  • 55

1 Answers1

0

HID mode is not sufficient since that will require a user to navigate to a specific field and then perform their scanning

That is correct.

SingleEntry from the examples on github is currently the easiest way to "get started". It sounds like you don't need to change any scanner settings and you don't want that data in your Activity, which means you can remove a lot of stuff in SingleEntry and it would still meet your needs.

Enrico
  • 10,377
  • 8
  • 44
  • 55