Label Capture Session#

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

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.


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.

@NonNull List<@NonNull CapturedLabel> getCapturedLabels()

Added in version 6.0.0

List of currently captured labels.

int getLastProcessedFrameId()

Added in version 6.0.0

The identifier of the last processed frame.

long getFrameSequenceId()

Added in version 6.1.0

The identifier of the current frame sequence.


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.

@NonNull String toJson()

Added in version 6.4.0

Returns the JSON representation of the label capture session.