NfcIsoTag

abstract class NfcIsoTag

Class representing a ISO/IEC 14443-4 tag.

This is an abstract super class intended for OS-specific code to implement the transceive method.

Once you're done with the tag, close must be called to release all resources.

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val maxTransceiveLength: Int

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

Functions

Link copied to clipboard
abstract suspend 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
abstract suspend 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
abstract suspend fun updateDialogMessage(message: String)

Updates the message in the Scan NFC dialog