Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for Xamarin.Android and Data Capture SDK Documentation for Xamarin.iOS

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.SymbologyEan13, true);
settings.SetSymbologyEnabled(Barcode.SymbologyUpca, true);
settings.SetSymbologyEnabled(Barcode.SymbologyEan8, true);
settings.SetSymbologyEnabled(Barcode.SymbologyUpce, 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.CameraFacingBack, or
// ScanSettings.CameraFacingFront.
settings.CameraFacingPreference = ScanSettings.CameraFacingBack;
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.CameraFacingBack, or
// ScanSettings.CameraFacingFront.
settings.CameraFacingPreference = ScanSettings.CameraFacingFront;
picker.ApplyScanSettings(settings);


ScanSettings settings = ScanSettings.Create();
// configure settings
...
// reduce the scanning area to 10% of the display height.
settings.setScanningHotSpotHeight(0.1f);
settings.setRestrictedAreaScanningEnabled(true);
mPicker.applyScanSettings(settings);
// Reduce the size of the white viewfinder rectangle.
// This only affects the rectangle - not the active scanning area!
mPicker.getOverlayView().setViewfinderDimension(0.6f, 0.1f, 0.6f, 0.1f);


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.SymbologyMsiPlessey, true);
settings.GetSymbologySettings(Barcode.SymbologyMsiPlessey).Checksums = SymbologySettings.ChecksumMod10;
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 Define the scanning area to learn more.