ExternalNfcReaderStore

class ExternalNfcReaderStore(storage: Storage, partitionId: String)

A persistent store for externally connected NFC readers.

Use org.multipaz.nfc.ExternalNfcReaderStore.create to create an instance.

Constructors

Link copied to clipboard
constructor(storage: Storage, partitionId: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val _readers: MutableStateFlow<List<ExternalNfcReader>>
Link copied to clipboard
val readers: StateFlow<List<ExternalNfcReader>>

A StateFlow with the currently configured ExternalNfcReader.

Functions

Link copied to clipboard
suspend fun addUsbReader(displayName: String, vendorId: Int, productId: Int): ExternalNfcReaderUsb

Adds a new external NFC reader connected via USB.

Link copied to clipboard

Adds a USB device to the ExternalNfcReaderStore if it doesn't exist already.

Link copied to clipboard
suspend fun removeReader(reader: ExternalNfcReader)

Removes a previously configured reader.