Scandit QR / Barcode
Equip your app with QR and Barcode scanning by leveraging the Scandit native SDKs.
The Scandit QR Code and Barcode Scanner plugin enables barcode scanning directly within your application using the device camera. This plugin extends the functionality of our basic version of Barcode Scanner with additional capabilities provided by the Scandit iOS and Android SDKs.
In order to use this plugin an active Scandit license is required.
Implementation Guide
Plugin Configuration
Before implementing this feature, ensure that the premium module is integrated into your application. Additionally, you will need to add your license key to the plugin configuration as it is required to use the native iOS and Android SDKs of Scandit.
You can find you license key in Scandit under Projects & license keys > Project > License keys as shown in the picture below.

Scandit License Key
Insert the license key into the plugin configuration using Advanced Mode:

Scandit QR / Barcode configuration
JavaScript Bridge Methods
Define a Scan Callback
To initiate a barcode scan, define a JavaScript function to handle the scanned data. For example:
function scandit_result(data) {
console.log('Scanned barcode ' + data.code + ' of type ' + data.type);
}
Start a Scan
Use the following command to start a barcode scan via the Median JavaScript Bridge:
↔️Median JavaScript Bridge
To initiate a scan, open the URL:
// returns promise median.scanditBarcode.scan({'callback': scandit_result});
Tip: Some JavaScript Bridge commands return promises. These are indicated in comments for easy identification. Learn More.
Supported Barcode Symbologies
By default, the scanner supports the following barcode symbologies:
- ean13
- upc12
- ean8
- upce
- code39
- code128
- itf
- qr
- datamatrix
- pdf417
Restricting to Specific Symbologies
To restrict the scanner to specific barcode types, provide a comma-separated list of desired symbologies in the symbologies
parameter.
For example, to scan only QR codes and PDF417 barcodes:
↔️Median JavaScript Bridge
// returns promise median.scanditBarcode.scan({'callback': scandit_result, 'symbologies': 'qr, pdf417'});
Using a Parser for Specialized Data
Certain symbologies, such as Code 128, require a parser to correctly interpret the scanned data. Add the parser
parameter when calling median.scanditBarcode.scan.
For example, to scan QR codes and Code 128 barcodes with the dlid
parser:
↔️Median JavaScript Bridge
// returns promise median.scanditBarcode.scan({'callback': scandit_result, 'symbologies': 'qr, code128', 'parser': 'dlid'});
Updated 4 days ago