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

Public Member Functions

SymbologySettings getSymbologySettings (int symbology, int scanCaseMode)
 
void setSymbologyEnabled (int symbology, boolean enabled)
 
void setSymbologyEnabled (int symbology, boolean enabled, int scanCaseMode)
 
void setScanningAreaHeight (float height)
 
void setScanningAreaHeight (float height, int scanCaseMode)
 
void setMatrixScanEnabled (boolean enabled)
 
void setMaxNumberOfCodesPerFrame (int maxNumberOfCodesPerFrame)
 
void setCodeRejectionEnabled (boolean enabled)
 
void setHighDensityModeEnabled (boolean enable)
 
ScanSettings getScanSettings (int scanCaseMode)
 

Static Public Member Functions

static ScanCaseSettings create ()
 
static ScanCaseSettings createWithJson (JSONObject json) throws JSONParseException
 

Protected Member Functions

 ScanCaseSettings ()
 
 ScanCaseSettings (JSONObject json) throws JSONParseException
 

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

Constructor & Destructor Documentation

ScanCaseSettings ( )
protected

Initialize a new setting object.

Returns
New case settings object. Internal settings for forward and downward scan are the same.
Since
5.6.0
ScanCaseSettings ( JSONObject  json) throws JSONParseException
protected

Returns a scan case settings instance initialized with the values contained in JSON object.

Parameters
jsonJSON object, representing scan settings.
Returns
New case settings object, with internal settings for both forward and downward scan initialized with values from the JSON object.
Exceptions
JSONParseExceptionin case the JSON object is invalid.

Member Function Documentation

static ScanCaseSettings create ( )
static

Factory method creating a new scan case setting object.

Returns
Default scan case settings. Internal settings for forward and downward scan are the same.
Since
5.6.0
static ScanCaseSettings createWithJson ( JSONObject  json) throws JSONParseException
static

Factory method creating a new scan case setting object from a JSON object.

Parameters
jsonJSON object, representing scan settings.
Returns
Scan case settings, with internal settings for both forward and downward scan initialized with values from the JSON object.
Exceptions
JSONParseExceptionin case the JSON object is invalid.
Since
5.6.0
SymbologySettings getSymbologySettings ( int  symbology,
int  scanCaseMode 
)

Retrieve symbology-specific settings for either forward or downward scan.

Parameters
symbologyThe symbology for which to retrieve the settings.
scanCaseModeScan case mode, one of ScanCase.MODE_FACE_FORWARD or ScanCase.MODE_FACE_DOWNWARD.
Returns
The symbology-specific settings object.
Since
5.6.0
void setSymbologyEnabled ( int  symbology,
boolean  enabled 
)

Enable/disable decoding of a certain symbology for both forward and downward scan.

This function provides a convenient shortcut to enabling/disabling decoding of a particular symbology without having to go through SymbologySettings.

Some 1d barcode symbologies allow you to encode variable-length data. By default, the Scandit BarcodeScanner SDK only scans barcodes in a certain length range. If your application requires scanning of one of these symbologies, and the length is falling outside the default range, you may need to adjust the "active symbol counts" for the symbology in addition to enabling it. For details on defaults and how to calculate the symbol counts for each symbology, take a look at the barcode length page.

Parameters
symbologyThe symbology to be enabled.
enabledtrue when decoding of the symbology should be enabled, false if not.
Since
5.6.0
void setSymbologyEnabled ( int  symbology,
boolean  enabled,
int  scanCaseMode 
)

Enable/disable decoding of a certain symbology for either forward or downward scan.

This function provides a convenient shortcut to enabling/disabling decoding of a particular symbology without having to go through SymbologySettings.

Some 1d barcode symbologies allow you to encode variable-length data. By default, the Scandit BarcodeScanner SDK only scans barcodes in a certain length range. If your application requires scanning of one of these symbologies, and the length is falling outside the default range, you may need to adjust the "active symbol counts" for the symbology in addition to enabling it. For details on defaults and how to calculate the symbol counts for each symbology, take a look at the barcode length page.

Parameters
symbologyThe symbology to be enabled.
enabledtrue when decoding of the symbology should be enabled, false if not.
scanCaseModeScan case mode, one of ScanCase.MODE_FACE_FORWARD or ScanCase.MODE_FACE_DOWNWARD.
Since
5.6.0
void setScanningAreaHeight ( float  height)

Set the active scanning height for both forward and downward scan.

Use this method to set the active scanning height for both forward and downward scan.

Parameters
heightNew active scanning height
Since
5.6.0
void setScanningAreaHeight ( float  height,
int  scanCaseMode 
)

Set the active scanning height for either forward or downward scan.

Use this method to set the active scanning height for either forward or downward scan.

Parameters
heightNew active scanning height
scanCaseModeScan case mode, one of ScanCase.MODE_FACE_FORWARD or ScanCase.MODE_FACE_DOWNWARD.
Since
5.6.0
void setMatrixScanEnabled ( boolean  enabled)

Whether MatrixScan should be enabled in downward scanning mode.

MatrixScan allows you to know the location of all localized codes. In order to get MatrixScan, it is recommended to implement the ProcessFrameDelegate interface and to use ScanSession.getTrackedCodes(). To use the default MatrixScan UI, it is necessary to set ScanOverlay.setGuiStyle() to ScanOverlay.GUI_STYLE_MATRIX_SCAN. When implementing a custom MatrixScan UI, it is recommended to set ScanOverlay.setGuiStyle() to ScanOverlay.GUI_STYLE_NONE.

Parameters
enabledWhether MatrixScan should be enabled.
Since
5.7.0
void setMaxNumberOfCodesPerFrame ( int  maxNumberOfCodesPerFrame)

Set maximum number of codes to be decoded every frame in downward scanning mode.

Setting the maximum number of codes per frame to a high number may have negative impact on performance. Use with caution.

Parameters
maxNumberOfCodesPerFramethe new maximum number of codes.
Since
5.7.0
void setCodeRejectionEnabled ( boolean  enabled)

Set code rejection enabled/disabled.

Parameters
enabledWhether to enable code rejection
Since
5.7.0
void setHighDensityModeEnabled ( boolean  enable)

Turn on/off high density mode in downward scanning mode.

High density mode enables phones to work at higher camera resolution, provided they support it. When enabled, phones that are able to run the video preview at 1080p (1920x1080) will use 1080p and not just 720p (1280x720). High density mode gives better decode ranges at the expense of processing speed and allows to decode smaller code in the near range, or codes that further away.

By default, high density mode is disabled.

Parameters
enablewhether high density mode should be enabled
Since
5.7.0
ScanSettings getScanSettings ( int  scanCaseMode)

Retrieve the scan settings for either ScanCase.MODE_FACE_FORWARD or ScanCase.MODE_FACE_DOWNWARD.

Use this method to initialize the barcode picker for use with the Scandit Scan case.

Parameters
scanCaseModeScan case mode, one of ScanCase.MODE_FACE_FORWARD or ScanCase.MODE_FACE_DOWNWARD.
Returns
Scan settings object.
Since
5.6.0

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