ChipReadObserver

Receives a chip read's updates and its one ending.

Calls never overlap and come in order: every onUpdate, then exactly one onEnding, then nothing more. Which thread a call comes on is the read's setting: the platform read entry points hand every call to the main thread by default (ObserverThread.MAIN, in the order the SDK made them, none before start returned), so an observer can update a screen directly. With ObserverThread.CALLER most calls come from the read's own thread, but the first update and the updates and ending that a start or a cancel causes may come on the thread that called it. Return fast in either case.

Updates and endings never carry document data: no file content, no key, no value read from the document. An exception thrown by the observer is ignored and never changes the read.

The platform read entry points call both. The low-level ChipReader.read takes only a ChipReadUpdateListener, the update half, because its result is the ending; an observer is one.

Experimental: see ExperimentalTesseraChipApi.

Since

1.0.0

Inheritors

Functions

Link copied to clipboard
abstract fun onEnding(ending: ChipReadEnding)

How the read ended. Called exactly once per read, after the last onUpdate.

Link copied to clipboard
abstract override fun onUpdate(update: ChipReadUpdate)

A change of state or progress.