Package-level declarations

Types

Link copied to clipboard
class CcidException(message: String) : IOException

Custom exception class for CCID-specific errors. This exception is thrown when an error occurs during communication with the smart card, such as an invalid response or a command failure.

Link copied to clipboard
data class CommandApdu(val cla: Int, val ins: Int, val p1: Int, val p2: Int, val payload: ByteString, val le: Int)

A Command APDU according to ISO/IEC 7816.

Link copied to clipboard
sealed class ExternalNfcReader

Base class for external NFC readers.

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

A persistent store for externally connected NFC readers.

Link copied to clipboard
data class ExternalNfcReaderUsb(val id: String, val addedAt: Instant, val displayName: String, val vendorId: Int, val productId: Int) : ExternalNfcReader

An external NFC reader connected via USB.

Link copied to clipboard
data class HandoverRequestRecord(val version: Int, val embeddedMessage: NdefMessage)

Handover Request record.

Link copied to clipboard
data class HandoverSelectRecord(val version: Int, val embeddedMessage: NdefMessage)

Handover Select record.

Link copied to clipboard
data class NdefMessage(val records: List<NdefRecord>)

An immutable NDEF message.

Link copied to clipboard
data class NdefRecord(val tnf: NdefRecord.Tnf, val type: ByteString = ByteString(), val id: ByteString = ByteString(), val payload: ByteString = ByteString())

An immutable NDEF Record.

Link copied to clipboard
object Nfc

Constants and utilities related to NFC.

Link copied to clipboard
class NfcCommandFailedException(message: String, val status: Int) : Exception

Exception thrown if an NFC command doesn't return success.

Link copied to clipboard
abstract class NfcIsoTag

Class representing a ISO/IEC 14443-4 tag.

Link copied to clipboard
class NfcIsoTagAndroid(tag: IsoDep, context: CoroutineContext, updateMessage: (message: String) -> Unit) : NfcIsoTag
Link copied to clipboard
data class NfcScanOptions(val pollingFrameData: ByteString? = null)

Options used to influence NFC scanning.

Link copied to clipboard

Exception thrown if a NfcIsoTag is removed while trying to communicate with it.

Link copied to clipboard
interface NfcTagReader

An interface for reading NFC tags.

Link copied to clipboard
data class ResponseApdu(val status: Int, val payload: ByteString = ByteString())

A response APDU according to ISO/IEC 7816-4.

Link copied to clipboard
data class ServiceParameterRecord(val tnepVersion: Int, val serviceNameUri: String, val tnepCommunicationMode: Int, val wtInt: Int, val nWait: Int, val maxNdefSize: Int)

Service Parameter Record.

Link copied to clipboard
data class ServiceSelectRecord(val serviceName: String)
Link copied to clipboard
data class TnepStatusRecord(val status: Int)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Converts Minimum Waiting Time to a duration.

Link copied to clipboard

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