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 Cordova
Classes | |
enum | State |
enum | StateChangeReason |
Public Member Functions | |
void | volumeButtonToScanEnabled (boolean enabled) |
void | scanBeepEnabled (boolean enabled) |
void | errorSoundEnabled (boolean enabled) |
void | setTimeout (Number timeout, ScanCase.State fromState, ScanCase.State toState) |
Static Public Member Functions | |
static void | acquire (ScanSettings settings, CaseCallbacks callbacks) |
Detailed Description
Start a scanner for the Scandit case (iOS only).
Example (minimal) usage:
- Since
- 4.14.0
Class Documentation
enum Scandit::ScanCase::State |
enum Scandit::ScanCase::StateChangeReason |
Member Function Documentation
|
static |
Initializes a new scan case.
Note that the initial invocation of this method will activate the Scandit Barcode Scanner SDK, after which the device will count towards your device limit.
Make sure to set the app key available from your Scandit account through SBSLicense::setAppKey: before you call this initializer.
This is the recommended way to create a new ScanCase object.
- Parameters
-
settings The scan settings to use. callbacks The scan case callbacks.
- Since
- 4.14.0
void volumeButtonToScanEnabled | ( | boolean | enabled | ) |
Turn on/off scanning via the volume button.
Set to true to change the state of the scan case using the volume button (holding the volume button changes the state to ScanCase.State.Active, while releasing it changes the state to ScanCase.State.Standby). Set to false to avoid controlling the state of the scan case via the volume button.
The default value is false.
- Since
- 5.5.0
void scanBeepEnabled | ( | boolean | enabled | ) |
Whether to play a beep sound upon a successful scan.
By default, a beep sound is played upon successfully scanning a barcode. Set this property to false, to disable the sound. If the ringer mode is set to silent, no beep sound is played, regardless of the value of this property.
- Since
- 5.7.0
void errorSoundEnabled | ( | boolean | enabled | ) |
Whether to play an error sound when no code was scanned.
By default, an error sound is played when activating the scanner using the volume button control when no could be scanned. If the ringer mode is set to silent, no sound is played, regardless of the value of this property.
- Since
- 5.7.0
void setTimeout | ( | Number | timeout, |
ScanCase.State | fromState, | ||
ScanCase.State | toState | ||
) |
Set a timeout to automatically change state after a specific interval.
Set a timer that is started whenever the state is changed to fromState. The timer will have a time interval equal to timeout and then it will switch the state of the scan case to toState. The timer will be created every time the state of the scan case is equal to fromState. At any given time there could not be more than one timeout for each fromState.
- Parameters
-
timeout The interval of the timer. fromState The state from which the timer should start. toState The new state when the timer is fired.
- Since
- 5.7.0