MdocNfcDataTransferService

Service for implementing NFC data transfer according to ISO/IEC 18013-5:2021.

Applications can register an instance of this class in NfcApduRouter.buildServices for the mdoc NFC data transfer AID (A0000002480400).

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
protected val serviceScope: CoroutineScope

CoroutineScope tied to the lifecycle of this service (cancelled in stop).

Functions

Link copied to clipboard

Signals that the NFC link has been deactivated.

Link copied to clipboard
protected open suspend override fun processCommandApdu(commandApdu: CommandApdu): ResponseApdu

Processes a CommandApdu sequentially on the service's background coroutine.

Link copied to clipboard
protected open suspend override fun processDeactivated(reason: NfcDeactivationReason)

Processes a deactivation event sequentially on the service's background coroutine.

Link copied to clipboard

Enqueues an incoming CommandApdu for sequential processing by processCommandApdu.

Link copied to clipboard
open override fun start()

Starts the service and its internal APDU dispatch coroutine.

Link copied to clipboard
open override fun stop()

Stops the service and cancels its internal APDU dispatch coroutine.