Configuring default bar code formats

By default, the bar code reader in the Maximo® Mobile applications tries to read all bar code formats. To reduce the number of formats that the bar code reader tries to read, you must specify one or more default formats that are used in your organization.

Procedure

  1. Open the controller.js file for each app.
  2. Locate the following line in the file:
    'mxe.barcode.readers': ['all_formats']
  3. Change the default value of the property, which is all formats, to the default formats that you want to use. If you want to specify multiple formats, use a comma separator, for example:
    'mxe.barcode.readers': [‘code_128_reader’,‘upc_reader’]
    The following bar code formats are supported:
    • code_128_reader
    • ean_reader
    • ean_8_reader
    • code_39_reader
    • code_39_vin_reader
    • codabar_reader
    • upc_reader
    • upc_e_reader
    • i2of5_reader
    • 2of5_reader
    • code_93_reader
  4. Save the controller.js file.
  5. Optional: In the Technician and Inspections apps, any button that scans bar codes tries to read all of the default bar code formats that you specified. In the app.xml for either app, you can override the default bar codes formats that an individual button in the app tries to read.
    1. For each app, open the app.xml file.
    2. Locate the line that contains the button that you want to configure, for example:

      <barcode-button id="barcodebutton1" on-scan="handleBarcodeScan" timeout="30" label="ScanBarcode"/>

    3. Add the readers property to the line and specify one or more bar code formats, for example:

      <barcode-button id="barcodebutton1" on-scan="handleBarcodeScan" timeout="30" label="ScanBarcode"/> readers=“{[‘ean_reader’]}”/>

    4. Save the app.xml file.
  6. Build the apps and deploy them to the Maximo Manage server.