SparkScan

Defined in library scandit_datacapture_barcode_spark

Note

The SparkScan APIs are still in beta and may change in future versions of Scandit Data Capture SDK.

SparkScan
class SparkScan : DataCaptureMode

Added in version 6.20.0

Capture mode that implements SparkScan.

This capture mode uses the barcode scanning capability. It cannot be used together with other capture modes that require the same capabilities, e.g. BarcodeCapture.

SparkScan()
 SparkScan()

Added in version 6.20.0

Construct a new SparkScan mode with default settings.

SparkScan.withSettings(settings)
SparkScan.withSettings(SparkScanSettings settings)

Added in version 6.20.0

Construct a new SparkScan mode with the provided settings.

isEnabled
bool isEnabled

Added in version 6.20.0

This flag indicates whether the SparkScan mode is currently processing frames to recognise barcodes.

Changing this property from false to true causes the connected SparkScanView to start its scanning flow.

Changing this property from true to false causes the connected SparkScanView to stop its scanning flow and go to idle mode.

applySettings(settings)
Future<void> applySettings(SparkScanSettings settings)

Added in version 6.20.0

Asynchronously applies the new settings to the barcode scanner. If the scanner is currently running, the task will complete when the next frame is processed, and will use the new settings for that frame. If the scanner is currently not running, the task will complete as soon as the settings have been stored and won’t wait until the next frame is going to be processed.

addListener(listener)
void addListener(SparkScanListener listener)

Added in version 6.20.0

Adds the listener to this SparkScan instance.

In case the same listener is already observing this instance, calling this method will not add the listener again.

removeListener(listener)
void removeListener(SparkScanListener listener)

Added in version 6.20.0

Removes a previously added listener from this SparkScan instance.

In case the listener is not currently observing this instance, calling this method has no effect.

feedback
SparkScanFeedback feedback

Added in version 6.20.0

Instance of SparkScanFeedback that is used by SparkScan to notify users about a successful scan of a barcode.

To change the feedback emitted, the SparkScanFeedback can be modified as shown below, or a new one can be assigned.