Label Capture Listener
Defined under the namespace Scandit.Datacapture.Label
- LabelCaptureListener
interface LabelCaptureListener
Added in version 7.2.0
Interface to be implemented by listeners that want to observe a label capture mode and get informed whenever new labels have been captured, existing labels have been updated or lost.
This listener is essential to the Smart Label Capture workflow, providing callbacks for handling label recognition events and processing captured field data. Best practices include disabling the capture mode after successful recognition and using background processing for result handling.
Key responsibilities include:
Handling captured labels - Process complete labels and their field data
Managing capture lifecycle - Disable mode after successful capture to prevent duplicate results
Providing user feedback - Give immediate feedback on successful captures
Optional field handling - Process both mandatory and optional fields gracefully
- didUpdateSession(labelCapture, session, frameData)
didUpdateSession?(labelCapture: LabelCapture, session: LabelCaptureSession, frameData: FrameData):
void
Added in version 7.2.0
Invoked after label capture has processed a frame. The session contains a list of the currently captured labels, including both complete and incomplete labels being tracked. The list may be empty when no labels are currently detected.
Use this callback to:
Check for newly completed labels using CapturedLabel.isComplete
Extract data from captured label fields
Implement application-specific logic for handling captured labels
- didStartObservingLabelCapture(labelCapture)
didStartObservingLabelCapture?(labelCapture: LabelCapture):
void
Added in version 7.2.0
Invoked when the listener starts observing the label capture instance.
- didStopObservingLabelCapture(labelCapture)
didStopObservingLabelCapture?(labelCapture: LabelCapture):
void
Added in version 7.2.0
Invoked when the listener stops observing the label capture instance.