CameraSessionGate

Tracks the one running camera-session Job of a MrzCameraScanner.

The gate clears the job when the session ends for any reason, cancelled by stop or finished on its own, so start works again. start and stop are not thread-safe: call them from one lifecycle thread.

Since

0.2.0

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

true while a session is running.

Functions

Link copied to clipboard
fun start(launch: () -> Job)

Starts a session with launch when idle; does nothing while one is running.

Link copied to clipboard
fun stop()

Cancels the running session, if any. Does nothing when idle.