Using barcode scanner (like Grabba) from with-in my iOS application - ios

My objective is simple: Read the data from a barcode scanner.
I know that there's an option for scanning the barcode using camera, but in my experience the results are not very accurate in less than ideal situation i.e. bad lighting. So, I'm exploring if an external device can be easily connected with the iPhone/iPad and which can provide the barcode data just like an external keyboard.
So, can I read the barcode, which is scanned using an external device? If so, can I do it without writing any code, or will I have to specifically add some kind of support in my application?

Answer
Any iOS compatible Bluetooth scanner that supports HID mode. For instance, any Socket CHS. Once connected, it will behave exactly as you said "just like an external keyboard".
HID vs SDK
HID: Using any scanner as a keyboard, you are limited to inputting scanned data into open input fields where the user can modify the scanned data and there are limited options for post-processing and validation.
Because the scanner appears to iOS as a keyboard, iOS hides the onscreen keyboard - which makes sense... if the scanner were an actual keyboard. Some scanners (incl. Socket CHS 7Ci & 7Xi) provide a mechanism to force the keyboard (On our CHS double-click the power button) or the app can force the keyboard (see: related stackoverflow questions)
SDK: Developing an app using the SDK provides a more robust setup and handles more complex use cases: Scan into the application even if an input field is not active, enforce a particular scan order (Scan a UPC followed by a VIN number, not vice versa), or parse the scanned data (Breaking a timedate stamp into year, month, day, time).
Conclusion: Personally, I'd use HID mode as a quick and dirty way to get started, but would switch to the SDK for the final product. Obviously, it depends on how much control you need/want.
Disclaimer: I work for Socket Mobile

You can download the demo from the link
http://www.datecs.bg/en/products/Linea-Pro-iPhone-SDK/8/102
Just run LineaDemo after unzip it. It's scanning using Linea Pro Scanner[External device]

Related

Finding printers that work with Web Bluetooth

I would like to print to thermal receipt and label printers through the web (PWA) on Android devices.
In this page you can see some example code:
https://github.com/WebBluetoothCG/demos/blob/gh-pages/bluetooth-printer/index.html
Is it possible to print to "any" bluetooth enabled thermal printer or is there some process to determine which bluetooth receipt and label printers are compatible.
My worry is that some printers will only work with provided sdk's that are only written for java/objective-c/swift.
Unfortunately from what I have seen it takes a bit of investigation into an individual model of thermal printer to figure out whether it supports Bluetooth LE (as opposed to Bluetooth Classic) and to learn what dialect of printer control language it speaks (ESC/POS, ZPL, etc.). I recommend asking the manufacturer for detailed documentation (in case you have to build your own library) and letting them know that you are looking for something you can interface with using Web Bluetooth. If enough customers ask for it maybe they'll start advertising compatibility and even produce SDKs.

Read data from HID device in iOS

How to read data from HID device onto my iOS app in Objective C? I am trying to scan a barcode using external scanner and retrieve the data.
Have you checked this out?
https://developer.apple.com/library/content/samplecode/EADemo/Introduction/Intro.html
Also, having worked on this problem previously, I found non-MFI HID devices (like all the cheap BT scanners on eBay) function only as an external keyboard on iOS, unless you go the guidelines-breaking route #vitormm presented. To use an external keyboard for scanning in a guideline-compliant way, you need a UITextField or UITextView to be firstResponder when the user hits the scan button to capture the scan, or the scan will go into the bit bucket. From there, you'll need to use the textDelegate protocol and a timer to discern the end of the scan, or program the scanner to send a terminator character like a Carriage Return in between scans, and scan the input stream for the terminator.
Additionally, in my survey from about a year ago, I found most manufacturers of MFI barcode scanners provide a library to interface to their scanners. These function on a delegate callback or NSNotification type of architecture, which is what you really need for any sort of sophisticated mobile scanning application.

Catch scan of external barcode scanner while app not running

Currently I'm writing an application which will work with external barcode scanners over Bluethooth. I'm currently trying several different scanners and it seems they all simulate keyboard input if they scan a code. But now I've found a Socket Mobile scanner, which is certificated by apple and delivers a SDK.
What I need is a way to scan a code while the iPhone is in my pocket without the display unlocked (maybe in background if thats possible?).
So I want to know if it's even possible what I'm trying and if it is, can I achieve this with a Keyboard simulation or is the SDK thing a better way?
I would like to post some code at this point, but I've absolutely no idea where to start and I try to find something on google for 2 days now.
Thanks for help.

Bluetooth Smart: is it sensible to choose a device based on its peripheral name

I have an application (Basically an Arduino) that I connect to from iOS (and might use Android in the future as well) using BLE. I reprogram the BLE hosts to a specific value so that the when I ask the peripherals name after it gets discovered in iOS can be accepted or rejected.
I'm however not sure that this is a good way to do. The name has a code that users can easily change to an other (always valid) code. That way if two modules are up and running at the same time, users will be sure that only the module they are linked to is the one they want to be linked to. This is a bit the same like connecting a mouse / keyboard of course using 'normal' bluetooth.

iOS accessory SDK - 3.5mm jack control

I want to create a project which will interact with the iPhone/iPad via the 3.5mm jack. There are a bunch of these accessories on kickstarter.com. Although, I could't find any SDK that will provide me the possibility to get data from jack input.
I have seen that some people at progical.com have a sort of SDK that can manage this kind of connection but they haven't answered me yet (I applied for their SDK few months ago). Is there any alternative for that? I want to make this project in order to get my degree so the Apple MFI won't apply.
The project will consist in a bunch of sensors that will send data to my app using 3.5 audio jack. Using my app, I will process the received data.
The 3.5" Jack connector is originally supposed to send and receive audio data. It means that if a connection is plugged in, the OS will automatically redirect all audio signals to it (with a few exceptions). Thus, you can access the data using the built-in audio processing APIs of iOS, for example CoreAudio and audio queues.
As an example, you can generate and receive signals of different frequencies, which can be used to control and get information from external devices (you'll need some kind of electrical engineering for this to work, though - filtering, separating control frequencies, etc.).

Resources