Spark Capture#

Defined in package com.scandit.datacapture.barcode.spark.capture

Note

The Spark Capture API is still in beta and may change in future versions of the Scandit Data Capture SDK.

SparkCapture#
class SparkCapture : DataCaptureMode

Added in version 6.11.0

Capture mode that implements spark capture.

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.

forDataCaptureContext(dataCaptureContext, settings)#
static @NonNull SparkCapture forDataCaptureContext(
        @Nullable DataCaptureContext dataCaptureContext,
        @NonNull SparkCaptureSettings settings)

Added in version 6.11.0

Construct a new spark capture mode with the provided context and settings. When the context is not null, the capture mode is automatically added to the context.

isEnabled#
boolean isEnabled()
void setEnabled(boolean value)

Added in version 6.11.0

Implemented from DataCaptureMode. See DataCaptureMode.isEnabled.

applySettings(settings, whenDone)#
void applySettings(@NonNull SparkCaptureSettings settings, @Nullable Runnable whenDone)

Added in version 6.11.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.

applySettings(settings)#
void applySettings(@NonNull SparkCaptureSettings settings)

Added in version 6.11.0

Same as applySettings() with the second argument set to null.

dataCaptureContext#
@Nullable DataCaptureContext getDataCaptureContext()

Added in version 6.11.0

Implemented from DataCaptureMode. See DataCaptureMode.dataCaptureContext.

addListener(listener)#
void addListener(@NonNull SparkCaptureListener listener)

Added in version 6.11.0

Adds the listener to this spark capture instance.

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

removeListener(listener)#
void removeListener(@NonNull SparkCaptureListener listener)

Added in version 6.11.0

Removes a previously added listener from this spark capture instance.

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

feedback#
@NonNull SparkCaptureFeedback getFeedback()
void setFeedback(@NonNull SparkCaptureFeedback value)

Added in version 6.11.0

Instance of SparkCaptureFeedback that is used by spark capture to notify users about a successful scan of a barcode.

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

sparkCaptureLicenseInfo#
@Nullable SparkCaptureLicenseInfo getSparkCaptureLicenseInfo()

Added in version 6.12.0

The object containing information about spark capture licensing.

Note

This value is available with a small delay. To make sure it is available, set a DataCaptureContextListener and, as soon as DataCaptureContextListener.onModeAdded() is called, this license object is available.