decodeNdefHandoverCarrier

fun decodeNdefHandoverCarrier(record: NdefRecord, senderRole: MdocRole, fallbackUuid: UUID?, auxiliaryRecords: List<NdefRecord> = emptyList()): List<MdocConnectionMethod>

Decodes an NFC Connection Handover carrier configuration NdefRecord into zero or more single-mode MdocConnectionMethod instances.

Auxiliary data records ("mdoc", "mdocreader", "chble") return emptyList() when passed as record. Multi-mode BLE OOB + ChBleOptions records expand in preference order: Ble.DirectL2capCentral, Ble.DirectL2capPeripheral, Ble.GattCentral, Ble.GattPeripheral.

Return

the decoded single-mode MdocConnectionMethod instances, or emptyList() if record is an auxiliary or unsupported record.

Parameters

record

the candidate carrier configuration NdefRecord.

senderRole

the MdocRole of the peer that authored the NDEF message (MdocRole.MDOC for HandoverSelect, MdocRole.MDOC_READER for HandoverRequest).

fallbackUuid

fallback BLE service UUID to use when the BLE OOB record omits 0x07 UUID.

auxiliaryRecords

auxiliary data records referenced by this carrier's "ac" record.