NfcTagCache

Simple in-memory cache for the most recently scanned NFC tag.

The host Activity should call update from its onNewIntent() when a tag is discovered via NFC foreground dispatch. ReadNfcTagTool and WriteNfcTagTool operate on whatever tag is cached here.

Properties

Link copied to clipboard

the most recently scanned Tag, or null if none seen yet.

Functions

Link copied to clipboard
fun clear()

Clears the cached tag.

Link copied to clipboard
fun update(tag: Tag)

Records tag as the most recently scanned tag.