Barcode Selection Listener

Defined in package com.scandit.datacapture.barcode.selection

BarcodeSelectionListener
interface BarcodeSelectionListener

Added in version 6.9.0

The BarcodeSelection listener is the main way for hooking into BarcodeSelection. It provides a callback that is invoked when the state of selected barcodes changes.

onObservationStarted(barcodeSelection)
fun onObservationStarted(barcodeSelection: BarcodeSelection)

Added in version 6.9.0

Called when the listener starts observing the BarcodeSelection instance.

onObservationStopped(barcodeSelection)
fun onObservationStopped(barcodeSelection: BarcodeSelection)

Added in version 6.9.0

Called when the listener stops observing the BarcodeSelection instance.

onSelectionUpdated(barcodeSelection, session, frameData)
fun onSelectionUpdated(barcodeSelection: BarcodeSelection,
        session: BarcodeSelectionSession,
        frameData: FrameData?)

Added in version 6.9.0

Invoked whenever a barcode is selected or a previously selected barcode is unselected.

FrameData is null if the camera is frozen and the selection is changed.

onSessionUpdated(barcodeSelection, session, frameData)
fun onSessionUpdated(barcodeSelection: BarcodeSelection,
        session: BarcodeSelectionSession,
        frameData: FrameData?)

Added in version 6.9.0

Invoked after a frame has been processed by barcode selection and the session has been updated. In contrast to onSelectionUpdated(), this method is invoked, regardless whether a code was selected or not.

FrameData is null if the camera is frozen and the selection is changed.