How can I read linear (one-dimensional, such as Code 128) barcodes using the camera on an iOS device from a web page?
Essentially, I suppose I'm looking for a free barcode scanner app that I can install on an iPad but that can be used by my web app. I want to launch the barcode scanner from the web browser and then receive the scanned data. How does this process look on iOS? Does the barcode scanner app need to support a callback scheme like someProtocol://scanBarcode?callback=http://example.com/scan.do%3Fscanned=
so it can "relaunch" my web app? Are there other ways to accomplish this type of data transfer/interaction between web apps and native apps on iOS?
You can use Camera or the Code Scanner to scan Quick Response (QR) codes for links to websites, apps, coupons, tickets, and more. The camera automatically detects and highlights a QR code.
You can scan QR codes on an Android device using the default camera app or the Google Lens app. As long as your Android device has a camera, it should be able to scan any QR code.
In the same way that it supports Android, the free and open source Zxing Barcode Scanner on iOS version 1.1 now supports web-based scanning with a URL callback.
zxing://scan/?ret=http%3A%2F%2Ffoo.com%2Fproducts%2F%7BCODE%7D%2Fdescription&SCAN_FORMATS=UPC_A,EAN_13
Simply use a zxing://scan/
URL with {CODE}
as a placeholder in the callback URL. For example, the above example would load http://foo.com/products/01234/description
if the barcode 01234 were scanned.
Unfortunately, only QR codes are supported in version 1.1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With