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.
About this task
You can configure bar code readers for web role-based applications for bar codes or QR
codes, but it will not work for both.
Procedure
-
Open the controller.js file for each app.
- Locate the following line in the file:
'mxe.barcode.readers': ['all_formats']
- 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
- Save the controller.js file.
- Optionally, 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.
- For each app, open the app.xml file.
- 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"/>
- 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’]}”/>
- Save the app.xml file.
- Build the apps and deploy them to the Maximo Manage server.