Label Capture

Defined under the namespace Scandit.Datacapture.Label

LabelCapture
class LabelCapture

Added in version 7.2.0

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

forContext(context, settings)
static forContext(context: DataCaptureContext,
        settings: LabelCaptureSettings): Promise<LabelCapture>

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

isEnabled()
isEnabled(): Promise<boolean>

Added in version 7.2.0

Returns whether the LabelCapture mode is enabled.

setEnabled(enabled)
setEnabled(enabled: boolean): Promise<void>

Added in version 7.2.0

Enables or disables the LabelCapture mode.

applySettings(settings)
applySettings(settings: LabelCaptureSettings): Promise<void>

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

addListener(listener)
addListener(listener: LabelCaptureListener): void

Added in version 7.2.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)
removeListener(listener: LabelCaptureListener): void

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

labelCaptureLoader()
function labelCaptureLoader(): ModuleLoader

Added in version 7.2.0

Use this function to load the Label Capture module when configuring the SDK with Core.configure(). The function must be called and its result must be passed to the option ConfigureOptions.moduleLoaders.