android library

The Android surface: everything android.nfc offers and this package exposes.

Every symbol here throws on iOS. Import it with a prefix when you also import package:nfc_util/ios.dart.

import 'package:nfc_util/android.dart' as android;

final classic = android.MifareClassic.from(tag);
if (classic != null && await classic.authenticateSectorWithKeyA(sectorIndex: 1, key: key)) {
  print(await classic.readBlock(blockIndex: 4));
}

Classes

HostCardEmulation
Host card emulation: the phone answers a reader as if it were a contactless card.
IsoDep
ISO 14443-4, the APDU transport. Android only; iOS exposes it as Iso7816.
MifareClassic
NXP Mifare Classic. Android only -- iOS cannot talk to these tags at all, which is an Apple restriction rather than a gap in this package.
MifareUltralight
NXP Mifare Ultralight. Android only; iOS reaches these through MiFare.
NdefAndroid
What Android reports about a tag's NDEF support beyond what the cross-platform Ndef exposes.
NdefFormatable
A tag that can be formatted to hold NDEF but has not been yet. Android only: CoreNFC has no equivalent, so an unformatted tag cannot be prepared from iOS.
NfcA
ISO 14443-3A. Android only.
NfcB
ISO 14443-3B. Android only.
NfcBarcode
A Kovio barcode tag. Android only.
NfcF
JIS 6319-4, the FeliCa transport. Android only; iOS exposes FeliCa as FeliCa instead.
NfcUtilAndroid
The raw Android surface.
NfcV
ISO 15693. Android only; iOS exposes it as Iso15693 with typed commands instead.

Enums

MifareClassicType
The Mifare Classic variant a tag reports.
MifareUltralightType
The Mifare Ultralight variant a tag reports.
NfcBarcodeType
The barcode standard a tag follows.
NfcReaderFlag
An NfcAdapter.FLAG_READER_* value.