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 Xamarin.Android and Data Capture SDK Documentation for Xamarin.iOS

IScanSession Interface Reference

Public Member Functions

List< Barcode > NewlyRecognizedCodes ()
List< Barcode > NewlyLocalizedCodes ()
List< Barcode > AllRecognizedCodes ()
void Clear ()
void PauseScanning ()
void StopScanning ()
void rejectCode (Barcode code)

Detailed Description

Interface for a scan session.

The scan session holds all barcodes that were decoded in the current session. These codes are available as AllRecognizedCodes().

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", see ScanSettings.CodeDuplicateFilter for details.

Session Lifetime

The session is cleared when either BarcodePicker.StartScanning() or , BarcodePicker.StopScanning() is called, or when the user manually clears the session using Clear.

See also
ScanditBarcodePicker.Android.ScanSettings.CodeCachingDuration ScanSettings.CodeCachingDuration
ScanditBarcodePicker.Android.ScanSettings.CodeDuplicateFilter ScanSettings.CodeDuplicateFilter

Member Function Documentation

List<Barcode> NewlyRecognizedCodes ( )
a new copy of the list of barcodes that have been successfully recognized in the last frame.
List<Barcode> NewlyLocalizedCodes ( )
a new copy of the list of barcodes that have been localized in the last frame. This list does not include barcodes that have been successfully recognized.
List<Barcode> AllRecognizedCodes ( )

Returns the list of barcodes (data, symbology) that have been recognized in this session.

Depending on the code caching and duplicate filtering behaviour, different sets of codes are returned by this method.

See also
a new copy of the list of barcodes that have been successfully decoded in this session
void Clear ( )

Remove all recognized and localized codes from the session.

Removes all recognized and localized codes from this session. This call also resets the duplicate filter.

void PauseScanning ( )

Immediately Pauses barcode recognition, but keeps camera preview open.

This is useful for briefly pausing the barcode recognition to show the recognized code in an overlay and then resume the scan process to scan more codes.

When only scanning one code and then returning to another part of the application, it is recommended to call StopScanning() instead.

Pausing will not clear the scan session. To remove all codes from the scan session call Clear().

See also
void StopScanning ( )

Immediately stops the scanning and clears the scan session.

Calling stop will release the camera, so that other applications can use it.

See also
void rejectCode ( Barcode  code)

Prevent beeping/vibrate and highlighting for a particular code.

Use this method to reject a certain code if you have additional methods for verifying the integrity of the code, e.g. with a custom checksum. Rejected codes won't be highlighted in the scan UI. Additionally beep and vibration will be surpressed.

For code rejection to work, you must enabled it by setting code rejection to true.

Rejected codes will be added to AllRecognizedCodes like all other codes.

Note that you should only pass codes returned by NewlyRecognizedCodes as passing any other code will have no effect. Additionally, you should only calls this method from a DidScan delegate.

codeThe code to reject