LocalNfcReader

actual class LocalNfcReader
expect class LocalNfcReader
actual class LocalNfcReader
actual class LocalNfcReader

Deprecated

Experimental. This code is not intended to be used in production and will be removed soon!

WARNING: Experimental. This code is not intended to be used in production and will be removed soon!

Constructors

Link copied to clipboard
constructor(activity: Activity)
constructor(getErrorMsg: (e: Exception) -> String)
constructor(readerNameFilter: String = "*")

Properties

Link copied to clipboard
actual var name: String
expect var name: String
actual var name: String
actual var name: String
Link copied to clipboard
Link copied to clipboard
actual var scanMessage: String
expect var scanMessage: String
actual var scanMessage: String
actual var scanMessage: String

Functions

Link copied to clipboard

Closes safely the current physical channel.

Link copied to clipboard
actual fun getPowerOnData(): String
expect fun getPowerOnData(): String

Returns the power-on data. The power-on data is defined as the data retrieved by the reader when the card is detected.

actual fun getPowerOnData(): String
actual fun getPowerOnData(): String
Link copied to clipboard
actual fun openPhysicalChannel()
expect fun openPhysicalChannel()

Attempts to open the physical channel with the card.

actual fun openPhysicalChannel()
actual fun openPhysicalChannel()
Link copied to clipboard
actual fun releaseReader()
expect fun releaseReader()

Releases the reader and safely stops any ongoing NFC polling operations.

actual fun releaseReader()
actual fun releaseReader()
Link copied to clipboard
actual fun startCardDetection(onCardDetected: () -> Unit)
expect fun startCardDetection(onCardDetected: () -> Unit)

Starts monitoring the reader for card detection events asynchronously.

actual fun startCardDetection(onCardDetected: () -> Unit)
actual fun startCardDetection(onCardDetected: () -> Unit)
Link copied to clipboard
actual fun transmitApdu(commandApdu: ByteArray): ByteArray
expect fun transmitApdu(commandApdu: ByteArray): ByteArray

Transmits an Application Protocol Data Unit (APDU) command to the smart card and receives the response.

actual fun transmitApdu(commandApdu: ByteArray): ByteArray
actual fun transmitApdu(commandApdu: ByteArray): ByteArray
Link copied to clipboard
actual suspend fun waitForCardPresent(): Boolean
expect suspend fun waitForCardPresent(): Boolean

Suspends until a card is detected.

actual suspend fun waitForCardPresent(): Boolean
actual suspend fun waitForCardPresent(): Boolean