Class: BarcodeScannerPanel

parasql.ui.BarcodeScannerPanel(config)

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
Latest Browser Compatibility Info

Constructor

new BarcodeScannerPanel(config)

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
Since:
  • v128
License:
Examples
// simple example
new parasql.ui.BarcodeScannerPanel({ callback: function(scanStr) { alert(scanStr) } }).show();
// usage example for a click event on a button
function (event) {

   new parasql.ui.BarcodeScannerPanel({ 
       callback: function(scanStr) { 
       
           let searchField = parasql.app.getWidgetById('ID2627');
           searchField.setDataValue( new parasql.schema.DataValue(scanStr) );
           
           let searchButton = parasql.app.getWidgetById('ID2630');
           searchButton.performClick();
       }
   }).show();
}

Extends

Methods

getContentDiv() → {HTMLElement}

Inherited From:
Returns:
Returns this panel's content div.
Type
HTMLElement

hide()

Overridden to stop video capture when panel hidden.
Overrides:

show()

Displays this ModalPanel.
Inherited From: