Label Capture Session

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

LabelCaptureSession
class LabelCaptureSession

Added in version 6.0.0

Holds the ongoing state of capturing data contained in one or more labels. An instance of this class is passed to LabelCaptureListener.onSessionUpdated() when new labels are captured, or existing labels are updated or lost.

Important

The capture session should only be accessed from within onSessionUpdated() to which it is provided as an argument. It is not safe to be accessed from anywhere else since it may be concurrently modified.

Specifically no reference to capturedLabels should be kept and traversed outside of onSessionUpdated(). Instead a copy of the list should be made to avoid concurrent modification. The individual labels can be referenced without copying as they are not further modified.

capturedLabels
@NonNull List<@NonNull CapturedLabel> getCapturedLabels()

Added in version 6.0.0

List of currently captured labels.

lastProcessedFrameId
int getLastProcessedFrameId()

Added in version 6.0.0

The identifier of the last processed frame.

frameSequenceId
long getFrameSequenceId()

Added in version 6.1.0

The identifier of the current frame sequence.

Important

As long as there is no interruptions of frames coming from the camera, the frameSequenceId will stay the same, whereas the lastProcessedFrameId will be incremented for every processed frame.

toJson()
@NonNull String toJson()

Added in version 6.4.0

Returns the JSON representation of the label capture session.