Using a barcode scanner (e.g. Grabba) from an iOS application in my application

My goal is simple: read data from a barcode scanner.

I know that it is possible to scan a barcode using a camera, but in my experience the results are not very accurate in a less ideal situation, that is, poor lighting. So, I am exploring whether it is easy to connect an external device to an iPhone / iPad and which can provide barcode data just like an external keyboard.

So, can I read a barcode that is being scanned using an external device? If so, can I do this without writing any code, or will I need to specifically add some support in my application?

+4
source share
2 answers

Answer

Any iOS-compatible Bluetooth scanner that supports HID mode. For example, any Socket CHS. Once connected, it will behave exactly like you said "just like an external keyboard."

HID vs SDK

HID:. Using any scanner as a keyboard, you can enter the scanned data in the open input fields, where the user can change the scanned data, as well as limited options for subsequent processing and verification.

Since the scanner appears on iOS as a keyboard, iOS hides the on-screen keyboard - which makes sense ... if the scanner was a real keyboard. Some scanners (including Socket CHS 7Ci and 7Xi) provide a forced keyboard mechanism (double click the power button on our CHS), or the application can force the keyboard (see link stack questions)

SDK: Developing an application using the SDK provides more robust customization and handling of more complex use cases. Scanning to the application, even if the input field is inactive, ensures a certain scanning order (Scan UPC, followed by the VIN number, and not vice versa) or analyze the scanned data (break the time stamp in a year, month, day, time).

Conclusion: Personally, I would use the HID mode as a quick and dirty way to get started, but switched to the SDK for the final product. Obviously, it depends on what kind of control you need.

Disclaimer I work for Socket Mobile

+9
source

You can download the demo from the link

http://www.datecs.bg/en/products/Linea-Pro-iPhone-SDK/8/102

Just run LineaDemo after unzipping. Scanning with a Linea Pro scanner [External device]

+1
source

All Articles