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

BarcodeScannerSession Class Reference

Inherits NativeHandle.

Public Member Functions

void clear ()
long getLastProcessedFrameId ()
List< BarcodegetNewlyLocalizedCodes ()
List< BarcodegetAllRecognizedCodes ()
List< BarcodegetNewlyRecognizedCodes ()

Detailed Description

Holds recognized and localized barcodes/2d codes.

The barcode scanner session keeps track of decoded and localized barcodes and handles duplicate removal.

Obtaining the barcode scanner session

The barcode scanner session can be obtained at any time from a barcode scanner object by calling BarcodeScanner.getSession().

Configuring Session Behaviour

The scan session is responsible for determining the list of relevant barcodes by filtering out duplicates. Depending on your app, different duplicate removal is required. For some applications, only one barcode is required. The scanning process is stopped as soon as one code is decoded. For other applications, multiple codes are scanned after another. For example, a scanner at the cash desk may need to scan multiple products. To avoid duplicates, the same barcode should not be scanned in short succession. The same barcode (data, symbology) should not count as a duplicate if encountered again after a few seconds.

By default, if a barcode has the same symbology and data as code that was decoded less than 500ms ago, it is filtered out as a duplicate. The exact filtering behaviour can be changed by setting the code duplicate filter, and code caching duration in BarcodeScannerSettings


Member Function Documentation

void clear ( )

Clear the barcode scanner session.

This removes all recognized barcodes from the scanner session.

long getLastProcessedFrameId ( )

Get unique ID of the last processed frame.

the frame id
List<Barcode> getNewlyLocalizedCodes ( )

Get all codes localized but not recognized in the last frame.

A new list of codes that have been localized in the last frame.
List<Barcode> getAllRecognizedCodes ( )

Get all recognized codes in the session.

A new list of codes contained in the session.
List<Barcode> getNewlyRecognizedCodes ( )

Get codes that have been recognized in the last frame.

A new list of codes that have been recognized in the last frame.

The documentation for this class was generated from the following file: