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

Since
4.6.0

Member Function Documentation

void clear ( )

Clear the barcode scanner session.

This removes all recognized barcodes from the scanner session.

Since
4.7.0
long getLastProcessedFrameId ( )

Get unique ID of the last processed frame.

Returns
the frame id
Since
4.7.0
List<Barcode> getNewlyLocalizedCodes ( )

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

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

Get all recognized codes in the session.

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

Get codes that have been recognized in the last frame.

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

The documentation for this class was generated from the following file:
  • BarcodeScannerSession.java