|
ScanningFromWebPages
Using Barcode Scanner on Android to scan from a web page
Featured Using Barcode Scanner on Android to scan from a web pageAs of Barcode Scanner 3.3, on Android, you can invoke Barcode Scanner from a web page and have the result returned to your site via a callback URL. Simply link to a URL like this: http://zxing.appspot.com/scan?ret=http://foo.com/products/{CODE}/description&SCAN_FORMATS=UPC_A,EAN_13 (See alternate URL below.) Really, the parameter's value should be properly URL-escaped. The "ret" parameter specifies the URL to call back with the scan result. {CODE} may appear anywhere and will be replaced with the scanned barcode contents. "SCAN_FORMATS" may be optionally used to supply a comma-separated list of format names. iPhoneNote that this functionality will be available on the iPhone app "Barcodes" from about January 2012. iOS works differently, and so the URL pattern must instead begin with zxing://scan/. (The trailing slash is needed.) So for example: zxing://scan/?ret=http://foo.com/products/{CODE}/description&SCAN_FORMATS=UPC_A,EAN_13 Note that this syntax also works on Barcode Scanner 3.8 or later. Custom search URLUsers can specify a custom search URL to invoke when a barcode is scanned. When set under Settings, a Custom Search button will appear. The search URL can contain two placeholders: %s for the barcode content, and %f for the format. For example, http://example.org/?q=%s&f=%f might invoke, on a scan, a URL like http://example.org/?q=10359050900&f=EAN_13 | |