Configure the scanner's key settings

Enable barcode symbologies supported by your application.

By default, all barcode symbologies are disabled and you will have to specify the list of symbologies you would like to scan when instantiating the barcode picker. To optimize the barcode decoding performance, we recommend that you only enable symbologies required by your application.

The following sample enables decoding of retail symbologies, more specifically EAN-13/UPC-A, UPC-E and EAN-8.

// get the default settings with all symbologies disabled
ScanSettings settings = ScanSettings.create();
// enable EAN13/UPCA, UPCE and EAN8 decoding
settings.setSymbologyEnabled(Barcode.SYMBOLOGY_EAN13, true);
settings.setSymbologyEnabled(Barcode.SYMBOLOGY_UPCA, true);
settings.setSymbologyEnabled(Barcode.SYMBOLOGY_EAN8, true);
settings.setSymbologyEnabled(Barcode.SYMBOLOGY_UPCE, true);
// use the previously defined settings.
BarcodePicker picker = new BarcodePicker(context, settings);


Restrict the scan area

This can be useful if you hide part of the preview or want to scan barcodes only in a certain area of the preview. The implementation of it is explained here: Restrict the scanning area.


Customize the scan UI

The Scandit plugin enables you to change different aspects of the UI - you can crop the preview, display/hide the torch button or turn the sound of the scanner on/off. Have a look at Customize the scan UI for more information.


Set a symbology's extension

Some barcode symbologies support optional extensions such as inverted colors (printed white on black) and different symbology lengths. These options are set through SymbologySettings .

Have a look at Change the length of barcodes to decode to see how to set an extension.