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

Constructor

new BarcodeScannerPanel(config)

Since:
  • v128
License:
Example
// usage example for a click event on a button that puts the scanned barcode 
// in a search field and clicks the search 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();
}
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}

Inherited From:
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.

Inherited From: