HandoffObserver

Gives every call of a ChipReadObserver to a thread of the platform's choice, in order, for the platform read entry points (ObserverThread.MAIN): each call is handed to post, one after the other, and post must run what it gets first in, first out on the one thread.

The coordinator calls its observer one call at a time and in order, so posting each call in the order it arrives keeps that order. The ending is posted once and is the last call: anything after it is dropped. An exception app throws is ignored, as everywhere in a chip read, so it never reaches the thread it was handed to.

Experimental: see ExperimentalTesseraChipApi. Internal: see InternalTesseraChipApi.

Since

1.0.0

Parameters

app

The app's observer.

post

Runs a block later on the target thread, in the order of the calls, and never runs it on the calling thread before it returns.

Types

Link copied to clipboard

Creates one: HandoffObserver(app, post). Kotlin only: synthetic on the JVM, so Java cannot call it.

Functions

Link copied to clipboard
open override fun onEnding(ending: ChipReadEnding)

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

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

A change of state or progress.