Deprecation warning

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

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 Android

Batch Mode Scanning/Barcode Selection


The default scan mode provided by the Scandit Barcode Scanner searches barcodes/2d codes in the whole image. This works well when scanning individual codes. However, when scanning codes from sheets with a large number of densely packed barcodes, the full screen scan mode is not optimal as there is little control for the user to decide which code is going to get scanned. With very little code it is possible to implement mechanisms that help selecting the code to be scanned.

Two such "barcode selection modes" have been implemented in the BatchScanSample which is included in the Android SDK.

Aim and Scan

In the first of the two modes, the camera is started with the barcode scanner in paused state. After positioning the phone such that the barcode is in the center of the image, the user presses the "Scan barcode" button to activate the barcode scanner and scan the code.


To implement the Aim and Scan mode in your application, you will need to do the following:

  • Enable and set the restrict active area. This will make sure that codes are only scanned in a very thin band in the center of the image.
  • Modify the GUI style to have a "laser" line instead of a square view finder and the scan button to the view
//Set laser gui and add button
buttonScan = new Button(this);
buttonScan.setText("Scan barcode");
buttonScan.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
  • Resume scanning in scan button action
  • Pause the scanner when a barcode is detected, show the value decoded and set the user interface to “stop mode”
public void didScanBarcode(String barcode, String symbology) {
Toast.makeText(this, symbology + ": " + barcode, Toast.LENGTH_LONG).show();

Scan and Confirm

In this selection mode, the camera is started and the scanner activated to scan codes. When a code is scanned a confirm dialog is shown where the user can tap confirm when the correct code has been scanned.


To implement the Scan and Confirm mode in your application, you will need to do the following:

  • Enable and set the restrict active area
mBarcodePicker.getOverlayView().setViewfinderDimension(0.7f, 0.05f, 0.7f, 0.05f);
  • Modify the GUI style to have a "laser" line instead of a square view finder
  • Start the scanning
  • Show the last barcode scanned on the screen
public void didScanBarcode(String barcode, String symbology) {
Toast.makeText(this, symbology + ": " + barcode, Toast.LENGTH_LONG).show();