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 Cordova
Classes | |
enum | CameraFacing |
enum | WorkingRange |
Public Member Functions | |
SymbologySettings | getSymbologySettings (Barcode.Symbology symbology) |
void | setSymbologyEnabled (int symbology, boolean enabled) |
void | setProperty (String key, Object value) |
Public Attributes | |
boolean | highDensityModeEnabled |
Rect | activeScanningAreaPortrait |
Rect | activeScanningAreaLandscape |
String | deviceName |
HashMap< Barcode.Symbology, SymbologySettings > | symbologies |
CameraFacing | cameraFacingPreference |
Point | scanningHotSpot |
number | relativeZoom |
int | maxNumberOfCodesPerFrame |
boolean | codeRejectionEnabled |
Working Range/Focus Control | |
int | workingRange |
Scan Session Configuration | |
int | codeCachingDuration |
int | codeDuplicateFilter |
Detailed Description
Settings to configure the decoding process.
Class Documentation
enum Scandit::ScanSettings::CameraFacing |
enum Scandit::ScanSettings::WorkingRange |
The possible working ranges for the barcode picker.
- Since
- 4.11.0
Member Function Documentation
SymbologySettings getSymbologySettings | ( | Barcode.Symbology | symbology | ) |
Retrieve symbology specific-settings.
- Parameters
-
symbology the symbology settings to retrieve
- Returns
- the symbology settings object, or null, if symbology is an invalid symbology.
- Since
- 4.11.0
void setSymbologyEnabled | ( | int | symbology, |
boolean | enabled | ||
) |
Enable/disable decoding of a certain symbology.
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 SymbologySettings.activeSymbolCounts for this symbology. For details on defaults and how to calculate the symbol counts for each symbology, take a look at the barcode length page.
- Parameters
-
symbology The symbology to be enabled. enabled true when decoding of the symbology should be enabled, false if not.
- Since
- 4.11.0
void setProperty | ( | String | key, |
Object | value | ||
) |
Sets a property.
This function is for internal use only and any functionality that can be accessed through it can and will vanish without public notice from one version to the next. Do not call this function unless you specifically have to.
- Parameters
-
key The property's name. value The property's value.
Member Data Documentation
int workingRange |
The working range tells the engine at which distance barcodes are to be expected.
When set to WORKING_RANGE_STANDARD (the default), the focus is optimized for barcodes close to the camera. When set to WORKING_RANGE_LONG, the focus is optimized for far-away codes.
When using non-standard working range, it is better to directly pass the working range when constructing the barcode picker, because the camera can already start to adjust the focus at an earlier point in time.
The working range hint is ignored on cameras with fixed-focus.
int codeCachingDuration |
The duration (in milliseconds) for which barcodes are kept in the session.
When set to values larger than zero, the value is interpreted as milliseconds for which the barcodes should be kept in the session. If set to zero, barcodes are discarded before processing the next frame. Passing -1 will keep the codes for the duration of the scan session.
The default value is -1
int codeDuplicateFilter |
The duration of the duplicate filter in milliseconds.
When set to values larger than zero, barcodes with the same symbology and data are filtered out if they are decoded less than the specified milliseconds apart. Set this value to zero, if you do not want to filter duplicates. When set to -1, barcodes are filtered as duplicates if they match an already decoded barcode in the session.
By default, the duplicate filter is set to 500ms
- See also
- codeCachingDuration
boolean highDensityModeEnabled |
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.
Rect activeScanningAreaPortrait |
Sets the active scan area for portrait mode scanning.
By default, the barcode recognition engine searches the whole image for barcodes. Use this method to define the area in which barcodes are to be searched. Rectangle coordinates run from 0 to 1.
- Since
- 4.11.0
Invoking this method with invalid rectangles, e.g. rectangles whose x, y, width or height attributes are outside the allowed range of 0.0-1.0 will have no effect.
Rect activeScanningAreaLandscape |
Sets the active scan area for landscape mode scanning.
By default, the barcode recognition engine searches the whole image for barcodes. Use this method to define the area in which barcodes are to be searched. Rectangle coordinates run from 0 to 1.
- Since
- 4.11.0
Invoking this method with invalid rectangles, e.g. rectangles whose top, left, right, or bottom attributes are outside the allowed range of 0.0-1.0, or rectangles with negative width/height will have no effect.
String deviceName |
Sets the device name to identify the current device when looking at analytics tools.
Sends a request to the server to set this as soon as a connection is available.
- Parameters
-
deviceName A device name.
HashMap<Barcode.Symbology, SymbologySettings> symbologies |
Hash containing the symbology settings for each available symbology.
CameraFacing cameraFacingPreference |
The picker first gives preference to cameras of the specified direction.
When the device has no such camera, cameras of the opposite face are tried as well.
By default, the back-facing camera is preferred.
- Since
- 4.11.0
Point scanningHotSpot |
The location in the image where barcodes are decoded with the highest priority.
This variable shows a slightly different behavior depending on whether the full screen scanning is active or not. In Full screen scanning mode:
Sets the location in the image which is decoded with the highest priority when multiple barcodes are present in the image.
Changes the location of the spot where the barcode decoder actively scans for barcodes.
X and Y can be between 0 and 1, where 0/0 corresponds to the top left corner and 1/1 to the bottom right corner.
The default hotspot is centered on the image (0.5,0.5)
number relativeZoom |
The percentage of the max zoom (between 0 and 1).
int maxNumberOfCodesPerFrame |
Maximum number of codes to be decoded every frame.
The values are clamped to the range 1 to 6.
boolean codeRejectionEnabled |
Whether code rejection is enabled.
Property indicating whether code rejection is enabled. This feature allows you to implement custom integrity checks for recognized barcodes by rejecting codes that don't satisfy additional criteria. By default, code rejection is disabled.
- See also
- ScanSession.rejectCode(Barcode)
- Since
- 4.15.0