Use Barcode Scanner + with intent from Xamarin Android app - xamarin.android

I'm developing an app (for a single customer) with Xamarin that must read barcodes with the camera (and optionally with an external bluetooth scanner), and used for testing an Asus TF300T, a LG4xP880 and a Nexus 7 second edition (the target machine).
I tested ScandIt and ZXing, but the best results I had with the free Barcode Scanner app (same library of ZXing, I know, but can't get the same speed).
I've read that I can use it with an intent, and I can also buy the plus version (need portrait scanning), but I couldn't find any documentation on how to (if possible), with intent call only:
configure the layout, select portrait/landscape
select the barcode type (exclude some)
insert a button that exits scanning without reading
Is it possible?

ZXing provides an IntentIntegrator class that either launches ZXing or prompts the user to install it from the Google Play store. However, if you know Barcode Scanner or Barcode Scanner Plus is installed, you can just call StartActivityForResult yourself. Here is a recipe using StartActivityForResult
The layout is determined by the orientation of the device, there is no need to specify it. However, as you are aware, ZXing only works in landscape, so you will need to buy the plus version for portrait support.
ZXing provides two options for specifying the barcodes to decode
intent.putExtra("SCAN_MODE", ...)
According to ZXing Intents scan mode can be one of PRODUCT_MODE, ONE_D_MODE, QR_CODE_MODE or DATA_MATRIX_MODE. Alternatively you can provide a list of formats you'd like to support for any given instance
intent.putExtra("SCAN_FORMATS", "EAN_13,EAN_8,QR_CODE,...")
The plus version was published by Sean Owen of the ZXing team and it based on ZXing, so it probably has identical configuration options and responds to the same intent.
Bonus: I wrote an app for external scanners that does the heavy lifting of connecting and configuring the scanner. It makes it trivial to add bluetooth barcode scanner support to any new or existing app. Think of it as ZXing for bluetooth barcode scanning. The client code is up on GitHub and provides instructions for getting started.

Related

What API/SDK to print automatically to thermal printer (e.g. Brother QL) with my React Native iPhone app without interaction?

I've been looking into different API/SDKs that would be best and easiest to integrate with my React Native iPhone app. This is an internal employee app, that once a form is submitted I would like to automatically print out a label from a thermal printer (e.g. Brother QL1110NWB).
Some options I found are:
React Native:
https://github.com/christopherdro/react-native-print
Brother SDK:
https://support.brother.com/g/s/es/htmldoc/mobilesdk/
Apple AirPrint:
https://developer.apple.com/documentation/uikit/uiprintinteractioncontroller#//apple_ref/doc/uid/TP40010141-CH1-SW34
Does anyone have experience with any of these API/SDKs and can recommend best method for easy integration and be able to print directly without interaction?
Thank you!
If you can dictate the hardware to make sure it is compatible, then the Brother SDK will have the easiest integration and be transparent to the user.
Apple restricts Bluetooth Classic devices from connecting to iOS unless they are MFi certified, which adds to the price but enables the External Accessory Framework at the OS level. Device manufacturers can then sell a printer that is 'iOS certified' like the Brother QL1110NWB and provide the SDK to use it.
How to use bluetooth classic instead of le
You would need to write a React Native binding for each target device family to use the SDK's OS specific libraries. Brother has an iOS, Android and Xamarin SDK available, but I don't see one for React, so you would need to wrap their iOS SDK with hooks to invoke your print on demand. Before you start, contact Brother support or your sales rep, because they may be working on React Native SDK, or your organization may have enough buying power to request one. Either way, it's a good practice to make this an interface at the base React level so that new printers or platforms can be added just by implementing custom native device adapters.

Codename One Native Call to iOS QR Reader

We need to read Inverted QR Codes on both Android and iOS.
On Android we wrote a piece of native code to use QRDroid to do the scanning as it is capable of scanning both regular and inverted codes.
On iOS the standard barcode reader app is also capable of reading both regular and inverted codes.
Is there a way to to use the native app to do the scanning and then simply grab the output from it to use in our own app.
The first sample of native code we wrote implemented ZXing in iOS and the current code for QR reading is a cn1lib you can easily edit to do anything.
We also created a cn1lib for scandit which is a proprietary scanner library. You can use those as references.
The state of code scanning on iOS is a bit worse than Android so I'm not sure if you'll find what you are looking for.

Scanner device control in ios

I want to control scanner device through my iPhone app. Probably, the scanner machine writes output in particular path(image folder), but i want change the path using my iPhone app. I went through TWAIN api and MFI (made for iPhone) program, but i want to use already developed one. Is there any company that provides library to access its scanner device?
https://developer.apple.com/programs/mfi/
http://www.twain.org/
I have worked with cctv camera(ip-camera), we can handle it by its ip-address. I am looking for something similar.
From what I can understand from your question, I do not believe there is a way to connect to a Scanner via the USB/Lightning port.
Some scanners nowadays either have the ability already or the option to allow for Wifi connection with the device and the scanner. But these require development kits from the manufacturers and may involve a license fee or NDA.
From memory Canon, Fujitsu and Epson have scanners with this sort of capability, but there is no unified way of connecting them and would have to be done through individual SDK's

iOS - How to integrate bluetooth devices in my app

I'm trying to create some application that connects to blue tooth devices. A simple thing like a bluetooth barcode scanner that scans and sends a number to my app. I want to know which framework or something to be used in my app that can integrate the barcode scanner with my app. Is there any API or examples or tutorials etc that can help me implement such things?
Apple provides an API called the External Accessory framework, which can be used to interact with paired Bluetooth devices or devices connected through wired, Apple Connector at the base of the device.
However, to be able to use a paired device from within your application as you desire, you will have to a device that is designed to be compatible with iOS devices (meaning, the manufacturer must be a member of the Apple MFi program) and the device manufacturer must provide a protocol that you must add to your applications info.plist file.
If you have bought an off-the-shelf, Bluetooth barcode reader, there is a fair chance that you can not do what you are trying to do. If the device states that it can be integrated into custom iOS applications, consult the device manufacturer for further support regarding setting up your application to interact with their hardware.

Can someone suggest a hardware barcode scanner that will work with Titanium Developer?

I am looking for a hardware barcode scanner which is preferably wireless that can be interfaced with Titanium Developer.
I understand that the camera can be used to achieve this, however our requirement is for a field environment where it will not be uncommon for > 1,000 repeated scans to be performed so it has to be fast (~200ms scan time).
We will require > 500 of these devices.
In case you want to build your own solution using any of the compatible hardware, Please look in to Custom iOS module development
the bigest brands in the area are Datalogic
QuickScan Wireless Scanner
and Symbol (now Motorola)
CA50 Wireless Barcode Scanner
for compatibility against the software, you should send an email to Appcelerator Support

Resources