Text Capture Session#

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

TextCaptureSession#
class TextCaptureSession

Added in version 6.1.0

The text capture session is responsible for determining the list of relevant texts by filtering out duplicates. This filtering of duplicates is completely time-based and doesn’t use any information about the location of the text. By default, all the texts captured in a frame are always reported. It is possible to filter out texts recently captured by changing TextCaptureSettings.duplicateFilter.

When the text capture mode is disabled, the session’s duplicate filter is reset.

Important

The tracking session should only be accessed from within onTextCaptured() 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 newlyCapturedTexts should be kept and traversed outside of onTextCaptured(). Instead a copy of the list should be made to avoid concurrent modification. The individual captured texts can be referenced without copying as they are not further modified.

newlyCapturedTexts#
@NonNull List<@NonNull CapturedText> getNewlyCapturedTexts()

Added in version 6.1.0

List of texts that were newly captured in 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.

toJson()#
@NonNull String toJson()

Added in version 6.4.0

Returns the JSON representation of the text capture session.