Configure/Optimize the Barcode Recognition for your Use Case

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);


Select Camera Direction

The Scandit Barcode Scanner SDK supports both front and back-facing cameras. The camera direction can be specified when instantiating the BarcodePicker or while the picker is running.

Set camera facing direction when instantiating the picker:

This snippet shows how to set the camera facing preference when instantiating the picker.

ScanSettings settings = ScanSettings.create();
// configure the settings by enabling the required symbologies etc...
...
// set camera facing preference to either ScanSettings.CAMERA_FACING_BACK, or
// ScanSettings.CAMERA_FACING_FRONT.
settings.setCameraFacingPreference(ScanSettings.CAMERA_FACING_BACK);
BarcodePicker picker = new BarcodePicker(this, settings);

Set camera facing direction while the picker is running

This snippet shows how to switch the camera facing direction while the picker is running.

ScanSettings settings = ScanSettings.create();
// configure the settings by enabling the required symbologies etc...
...
// set camera facing preference to either ScanSettings.CAMERA_FACING_BACK, or
// ScanSettings.CAMERA_FACING_FRONT.
settings.setCameraFacingPreference(ScanSettings.CAMERA_FACING_FRONT);
picker.applyScanSettings(settings);


Set Checksum Used In Your Application

Some barcode symbologies support different checksum formats. The MSI Plessey decoder of the Scandit Barcode Scanner SDK has different checksums formats that need to be selected for the particular application.

ScanSettings settings = ScanSettings.create();
settings.setSymbologyEnabled(Barcode.SYMBOLOGY_MSI_PLESSEY, true);
settings.getSymbologySettings(Barcode.SYMBOLOGY_MSI_PLESSEY).setChecksums(SymbologySettings.CHECKSUM_MOD_10);
mPicker = new BarcodePicker(context, settings);


Disable the full image barcode detection for multi-barcode scenarios

The Scandit Barcode Scanner SDK by default searches for barcodes in the camera image. If you have an application where multiple barcodes will be present in the camera simultaneously, we recommend that you disable the full image detection and possibly also reduce the area in which barcodes are detected. Have a look at Restricting the Area Where Barcodes are Scanned to learn more.