Barcode Tracking

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

BarcodeTracking
class BarcodeTracking : DataCaptureMode

Added in version 6.0.0

Data capture mode that implements MatrixScan (barcode tracking).

Learn more on how to use barcode tracking in our Get Started With MatrixScan guide.

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

forDataCaptureContext(dataCaptureContext, settings)
static @NonNull BarcodeTracking forDataCaptureContext(
        @Nullable DataCaptureContext dataCaptureContext,
        @NonNull BarcodeTrackingSettings settings)

Added in version 6.0.0

Constructs a new barcode tracking mode with the provided context and settings. When the context is not null, the capture mode is automatically added to the context.

fromJson(dataCaptureContext, jsonData)
static @NonNull BarcodeTracking fromJson(@NonNull DataCaptureContext dataCaptureContext,
        @NonNull String jsonData)

Added in version 6.0.0

Constructs a new barcode tracking mode with the provided JSON serialization. See Serialization for details. The capture mode is automatically added to the context.

isEnabled
boolean isEnabled()
void setEnabled(boolean value)

Added in version 6.0.0

Implemented from DataCaptureMode. See DataCaptureMode.isEnabled.

applySettings(settings, whenDone)
void applySettings(@NonNull BarcodeTrackingSettings settings, @Nullable Runnable whenDone)

Added in version 6.0.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 BarcodeTrackingSettings settings)

Added in version 6.0.0

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

addListener(listener)
void addListener(@NonNull BarcodeTrackingListener listener)

Added in version 6.0.0

Adds the listener to observe this barcode 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 BarcodeTrackingListener listener)

Added in version 6.0.0

Removes a previously added listener from this barcode tracking instance.

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

createRecommendedCameraSettings()
static @NonNull CameraSettings createRecommendedCameraSettings()

Added in version 6.0.0

Returns the recommended camera settings for use with barcode tracking.

dataCaptureContext
@Nullable DataCaptureContext getDataCaptureContext()

Added in version 6.0.0

Implemented from DataCaptureMode. See DataCaptureMode.dataCaptureContext.

updateFromJson(jsonData)
void updateFromJson(@NonNull String jsonData)

Added in version 6.0.0

Updates the mode according to a JSON serialization. See Serialization for details.

barcodeTrackingLicenseInfo
@Nullable BarcodeTrackingLicenseInfo getBarcodeTrackingLicenseInfo()

Added in version 6.12.0

The object containing information about barcode tracking 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.

reset()
void reset()

Added in version 6.14.0

Resets the object tracker.