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
Ndefexposes. - 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.
- NfcAntennaInfo
- Where this device's NFC antennas are, for an app that wants to show the user where to hold the tag.
- NfcAntennaLocation
- Where one antenna sits, in millimetres from the top-left corner of the back of the device, held face up in its natural orientation.
- NfcB
- ISO 14443-3B. Android only.
- NfcBarcode
- A Kovio barcode tag. Android only.
- NfcEvent
- One card-emulation event from NfcUtilAndroid.onNfcEvent.
- 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.
- PollingFrame
- One frame of a reader's polling loop, seen while observe mode is on.
- TagIntentSetup
- Whether a tag intent can actually reach this app, as NfcUtilAndroid.checkTagIntentSetup found it.
Enums
- MifareClassicType
- The Mifare Classic variant a tag reports.
- MifareUltralightType
- The Mifare Ultralight variant a tag reports.
- NfcBarcodeType
- The barcode standard a tag follows.
- NfcEventKind
- What a NfcEvent is about.
- NfcInternalError
- What went wrong inside the NFC stack, for NfcEventKind.internalError.
- NfcListenTech
- A technology NfcUtilAndroid.setDiscoveryTechnology can listen as.
- NfcPollTech
- A technology NfcUtilAndroid.setDiscoveryTechnology can poll for.
- NfcReaderFlag
-
An
NfcAdapter.FLAG_READER_*value. - PollingFrameType
- What one frame of a reader's polling loop was.