NfcIsoTagAndroid

class NfcIsoTagAndroid(tag: IsoDep, context: CoroutineContext, updateMessage: (message: String) -> Unit) : NfcIsoTag

Constructors

Link copied to clipboard
constructor(tag: IsoDep, context: CoroutineContext, updateMessage: (message: String) -> Unit)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val maxTransceiveLength: Int

The maximum size of an APDU that can be sent via transceive.

Functions

Link copied to clipboard
open suspend override fun close()

Closes the tag and releases all resources.

Link copied to clipboard
suspend fun ndefReadMessage(wtInt: Int = 0, nWait: Int = 0): NdefMessage

Reads NDEF data according to NFC Forum Type 4 Tag section 7.5.4.

Link copied to clipboard
suspend fun ndefTransact(ndefMessage: NdefMessage, wtInt: Int, nWait: Int): NdefMessage

Exchanges NDEF messages according to NFC Forum Tag NDEF Exchange Protocol section 5.

Link copied to clipboard
suspend fun readBinary(offset: Int, length: Int): ByteArray

Reads binary data according to ISO 7816-4 clause 11.3.3.

Link copied to clipboard
suspend fun selectApplication(applicationId: ByteString)

Selects an application according to ISO 7816-4 clause 11.2.2.

Link copied to clipboard
suspend fun selectFile(fileId: Int)

Selects a file according to ISO 7816-4 clause 11.2.2.

Link copied to clipboard
open suspend override fun transceive(command: CommandApdu): ResponseApdu

Sends an APDU to the tag and waits for a response APDU.

Link copied to clipboard
suspend fun updateBinary(offset: Int, data: ByteArray)

Updates binary data according to ISO 7816-4 clause 11.3.5.

Link copied to clipboard
open suspend override fun updateDialogMessage(message: String)

Updates the message in the Scan NFC dialog