Label Capture#

Defined in package com.scandit.datacapture.label.capture

LabelCapture#
class LabelCapture : DataCaptureMode

Added in version 6.0.0

Data capture mode to scan labels, e.g. groups of barcodes, or a combination of text and barcode in a fixed spatial arrangement.

forDataCaptureContext(dataCaptureContext, settings)#
static @NonNull LabelCapture forDataCaptureContext(
        @Nullable DataCaptureContext dataCaptureContext,
        @NonNull LabelCaptureSettings settings)

Added in version 6.0.0

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

fromJson(context, jsonData)#
static @NonNull LabelCapture fromJson(@NonNull DataCaptureContext context,
        @NonNull String jsonData)

Added in version 6.4.0

Construct a new label capture 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 LabelCaptureSettings settings, @Nullable Runnable whenDone)

Added in version 6.0.0

Asynchronously apply the new settings to label capture. If label capture is currently running, the task will complete when the next frame is processed, and will use the new settings for that frame. If label capture 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 LabelCaptureSettings settings)

Added in version 6.0.0

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

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

Added in version 6.0.0

Adds the listener to this label capture instance to observe the label capture mode and get notified when a label or some of its fields got scanned.

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

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

Added in version 6.0.0

Removes a previously added listener from this label capture 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 label capture.

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.4.0

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