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

ScanCaseListener Interface Reference

Public Member Functions

void didInitializeScanCase (ScanCase scanCase)
 
int didScan (ScanCase scanCase, ScanCaseSession session)
 
void didChangeState (ScanCase scanCase, int state, int reason)
 

Public Attributes

Possible reasons why the scan case state has changed.
int STATE_CHANGE_REASON_MANUAL
 
int STATE_CHANGE_REASON_TIMEOUT
 
int STATE_CHANGE_REASON_VOLUME_BUTTON
 
int STATE_CHANGE_REASON_HARDWARE_BUTTON
 

Detailed Description

Holds settings that affect the recognition of barcodes (e.g.

enabled barcode symbologies).

The settings are passed to the ScanCase when it is constructed.

Since
5.6.0

Member Function Documentation

void didInitializeScanCase ( ScanCase  scanCase)

Method invoked when ScanCase has finished the initialization.

This method is called on the ScanCaseListener as soon as ScanCase has completed the initialization process and the scanner is ready to be used. At this point the state of ScanCase is ScanCase.STATE_STANDBY.

Parameters
scanCaseThe scan case initialized.
Since
5.6.0
int didScan ( ScanCase  scanCase,
ScanCaseSession  session 
)

Method invoked whenever a new code is scanned.

This method is called on the ScanCaseListener whenever the barcode scanner has recognized new barcodes/2D codes. The newly recognized codes can be retrieved from the scan session's ScanCaseSession.getNewlyRecognizedCodes() method.

Parameters
scanCaseThe scan case on which codes were scanned.
sessionThe current scan session containing the state of the recognition process, e.g. the list of codes recognized in the last processed frame. The scan session can only be accessed from within this method. It is however possible to use codes returned by ScanSession.getNewlyRecognizedCodes() outside this method.
Returns
The new state for the scan case; e.g. return ScanCase.STATE_ACTIVE if you want to keep scanning, or return ScanCase.STATE_STANDBY if you want to pause the scanner.
Since
5.6.0
void didChangeState ( ScanCase  scanCase,
int  state,
int  reason 
)

Method invoked whenever the state of ScanCase is changed.

This method is called on the ScanCaseListener whenever the state of ScanCase is changed.

Parameters
scanCaseThe scan case on which codes were scanned.
stateThe new state of the scan case.
reasonThe reason for the state change.
Since
5.6.0

Member Data Documentation

int STATE_CHANGE_REASON_MANUAL

The state was changed directly.

int STATE_CHANGE_REASON_TIMEOUT

The change of state was driven by a timeout.

int STATE_CHANGE_REASON_VOLUME_BUTTON

The change of state was driven by the volume button.

int STATE_CHANGE_REASON_HARDWARE_BUTTON

The change of state was driven by a special hardware button (not all phones have one)


The documentation for this interface was generated from the following file:
  • ScanCaseListener.java