NfcTagCache
object 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.
Alongside the Tag handle, update snapshots the tag's NDEF contents as delivered at discovery time (Ndef.getCachedNdefMessage(), which needs no radio I/O) plus its maxSize / isWritable. Tags usually leave the field long before an LLM asks to read them, so ReadNfcTagTool serves this snapshot (with cached = true) when the live read fails with TagLostException.