scanBarCode

Allow the user to scan a barcode with a mobile device

Syntax

ui.Interface.frontCall("mobile", "scanBarCode",
   [], [code, type] )
  1. code - Holds a string representation of the barcode.
  2. type - Holds the name of the barcode type.

Usage

The "scanBarCode" front call starts the barcode scanner to let the user scan a barcode with the device.

After reading the barcode, the front call returns the string representation of the barcode and the barcode type (symbology).

The code return parameter contains the barcode string.

The type return parameter indicates the type of barcode that was scanned.

If the barcode scan was canceled, the code return parameter is set to NULL and type is set to "canceled".
  • On iOS devices, the barcode reader used by GMI is "ZBar". For more details, see ZBar bar code reader.
  • On Androidâ„¢ devices, the barcode reader used by GMA is "zxing". The zxing barcode reader must be installed as a separate app. For more details, see Barcode Scanner.
Table 1. Barcode types returned by GMI and GMA
Barcode type (GMI/iOS) Barcode type (GMA/Android) Description
AZTEC AZTEC Aztec barcode format
Unsupported CODABAR CODABAR format
CODE_39 CODE_39 AKA Alpha39, Code 3 of 9 or USD-3 format
CODE_93 CODE_93 Intermec (Canada Post) format
CODE_128 CODE_128 High-density barcode (128 chars) format
DATA_MATRIX DATA_MATRIX Data Matrix format
EAN_8 EAN_8 European/International Article Number (8 digits) format
EAN_13 EAN_13 European/International Article Number (13 digits) format
I2/5 ITF Interleaved 2 of 5 format
Unsupported MAXICODE ISO/IEC 16023 format
PDF_417 PDF_417 Portable Data File - 417 format
QR_CODE QR_CODE Quick Response Code format
Unsupported RSS_14 GS1 DataBar (Reduce Space Symbology) format
Unsupported RSS_EXPANDED GS1 DataBar Expanded (Reduce Space Symbology expanded) format
Unsupported UPC_A Universal Product Code (12 digits) format
UPC_E UPC_E Universal Product Code (6 digits) format
Unsupported UPC_EAN_EXTENSION UPC/EAN extension format