CardReaderManager

Inheritors

Properties

Link copied to clipboard
abstract val connectionState: StateFlow<CardReaderState>

Connection state for the current connected device.

Functions

Link copied to clipboard
abstract suspend fun connect(usbDevice: UsbDevice)

Connects to a USB card reader.

abstract suspend fun connect(cardReader: CardReader)

Connects to a card reader.

Link copied to clipboard
abstract suspend fun disconnect()

Disconnects from the current connected device.

Link copied to clipboard
abstract suspend fun firmwareUpdateState(): Result<FirmwareUpdateState>

Returns information about updates available for the current connected device.

Link copied to clipboard
abstract suspend fun getKnownDevices(): List<CardReader>

List of previously connected devices.

Link copied to clipboard
abstract fun startBluetoothDiscovery(): Flow<Result<List<CardReaderDiscoveredInfo>>>

Starts the discovery of compatible BTLE devices. Returns an error in case the discovery was not possible or scanning failed

Link copied to clipboard

Starts an update of the current connected reader's software

Link copied to clipboard
abstract suspend fun stopBluetoothDiscovery()

Stops the discovery of compatible BTLE devices.