Much has been said about 2D barcodes, and the discussion has focused on the format of the 2D barcode itself -- QR Code, Data Matrix, and so on. But equally important is the format of what the barcode itself encodes.
2D barcodes encode text, generally, but that text can represent many things. Commonly, 2D barcodes encode text that represents a URL, like "http://google.com/m". This is a special string of text since it is recognizable as a URL by readers, and therefore can be acted upon: the reader can open the URL in a browser.
2D barcodes can encode many types of actionable text. Text representing contact information, when recognized, could trigger a prompt to add the contact to an address book. But this only works when readers understand that text encodes contact information. For this, we need standards too.
There are some standards -- de facto and otherwise -- already in use. This wiki attempts to catalog some possible standards for encoding various types of information, and suggest a standard action associated to them. It is not necessarily complete and contributions are welcome.
The ZXing reader library supports all of the formats mentioned in this wiki and a bit more.
2D barcodes encode text, generally, but that text can represent many things. Commonly, 2D barcodes encode text that represents a URL, like "http://google.com/m". This is a special string of text since it is recognizable as a URL by readers, and therefore can be acted upon: the reader can open the URL in a browser.
2D barcodes can encode many types of actionable text. Text representing contact information, when recognized, could trigger a prompt to add the contact to an address book. But this only works when readers understand that text encodes contact information. For this, we need standards too.
There are some standards -- de facto and otherwise -- already in use. This wiki attempts to catalog some possible standards for encoding various types of information, and suggest a standard action associated to them. It is not necessarily complete and contributions are welcome.
The ZXing reader library supports all of the formats mentioned in this wiki and a bit more.
As 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.
iPhone
Note 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.
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.
iPhone
Note 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.









0 comments:
Post a Comment