Data Capture Context Listener

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

DataCaptureContextListener
interface DataCaptureContextListener

Added in version 6.0.0

Interface for observing/listening to mode and status changes of a data capture context.

To observe changes of the data capture context, one or more DataCaptureContextListener may be added. These listeners provide hooks into different parts of the data capture context.

onFrameSourceChanged(dataCaptureContext, frameSource)
fun onFrameSourceChanged(dataCaptureContext: DataCaptureContext,
        frameSource: FrameSource?)

Added in version 6.0.0

Invoked when the data capture context changed the frame source. Also invoked if the frame source is reset to null.

onModeAdded(dataCaptureContext, dataCaptureMode)
fun onModeAdded(dataCaptureContext: DataCaptureContext,
        dataCaptureMode: DataCaptureMode)

Added in version 6.0.0

Called when a mode got added to the context.

onModeRemoved(dataCaptureContext, dataCaptureMode)
fun onModeRemoved(dataCaptureContext: DataCaptureContext,
        dataCaptureMode: DataCaptureMode)

Added in version 6.0.0

Called when a mode got removed from the context.

onObservationStarted(dataCaptureContext)
fun onObservationStarted(dataCaptureContext: DataCaptureContext)

Added in version 6.0.0

Called when the listener has been added to the data capture context and is from now on receiving events.

onObservationStopped(dataCaptureContext)
fun onObservationStopped(dataCaptureContext: DataCaptureContext)

Added in version 6.0.0

Called when the listener has been removed from the data capture context and is no longer receiving events.

onStatusChanged(dataCaptureContext, contextStatus)
fun onStatusChanged(dataCaptureContext: DataCaptureContext,
        contextStatus: ContextStatus)

Added in version 6.0.0

Called when a context status changed.