BarcodeScannerPanel

parasql.ui. BarcodeScannerPanel

The BarcodeScannerPanel class provides native 1D and 2D barcode scanning capability by using the camera on your mobile device. Currently only Android mobile devices are supported.

Supported Barcode Formats
Browser Compatibility Info

Constructor

new BarcodeScannerPanel(config)

License:
Example
// usage example for a click event on a button 
function (event) {

   new parasql.ui.BarcodeScannerPanel({ 
       callback: function(scanStr) { 
       
           // this code is run when a valid barcode is detected
           let searchField = parasql.app.getWidgetById('ID2627');
           searchField.setDataValue( new parasql.schema.DataValue(scanStr) );
           
           let searchButton = parasql.app.getWidgetById('ID2630');
           searchButton.performClick();
       }
   }).show();
}
Parameters:
Name Type Description
config Object
Properties
Name Type Attributes Description
callback function

Callback function that will be passed a single string parameter containing the scanned value.

formats Array.<string> <nullable>

Optional array of barcode formats to restrict scanning to; by default all supported formats can be scanned. Supported Barcode Formats

Extends

Methods

getContentDiv() → {HTMLElement}

Overrides:
Returns:

Returns this panel's content div.

Type
HTMLElement

hide()

Overridden to stop video capture when panel hidden.

Description:
  • Overridden to stop video capture when panel hidden.

Overrides:

show()

Displays this ModalPanel.

Description:
  • Displays this ModalPanel.

Overrides: