NfcUtilAndroid class
The raw Android surface.
Everything here is Android-only; on iOS these calls throw. The cross-platform NfcUtil covers the common path, and this covers what it deliberately does not express.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onAdapterStateChanged
→ Stream<
NfcAdapterState> -
Emits when the user switches NFC on or off in system settings.
no setter
-
onNfcEvent
→ Stream<
NfcEvent> -
Card-emulation events, once enableNfcEvents has been called.
no setter
-
onTagFromIntent
← Future<
void> Function(NfcTag tag)? -
Tags delivered by an intent filter rather than by a reader session.
no getter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkTagIntentSetup(
) → Future< TagIntentSetup> - Everything that decides whether a tag intent can reach this app.
-
disableForegroundDispatch(
) → Future< void> - Releases the claim made by enableForegroundDispatch.
-
disableNfcEvents(
) → Future< void> - Stops delivering onNfcEvent.
-
disableReaderMode(
) → Future< void> - Stops reader mode.
-
enableForegroundDispatch(
) → Future< void> - Claims tag delivery while the activity is in the foreground.
-
enableNfcEvents(
) → Future< bool> - Starts delivering onNfcEvent. Returns false on a device below API 36.
-
enableReaderMode(
{required Set< NfcReaderFlag> flags, required Future<void> onDiscovered(NfcTag tag), Future<void> onError(NfcError error)?, Duration presenceCheckDelay = const Duration(milliseconds: 250)}) → Future<void> -
Starts reader mode with exactly
flags, bypassing the cross-platform mapping. -
getAntennaInfo(
) → Future< NfcAntennaInfo?> - Where this device's NFC antennas are, or null when the platform does not say.
-
isEnabled(
) → Future< bool> - Whether the adapter is switched on.
-
isSecureNfcEnabled(
) → Future< bool> - Whether secure NFC is on, restricting tag reading to an unlocked device.
-
isSecureNfcSupported(
) → Future< bool> - Whether the device supports secure NFC. API 29 and above; false below.
-
isTagIntentAllowed(
) → Future< bool> - Whether the user has allowed this app to be launched by a tag.
-
isTagIntentAppPreferenceSupported(
) → Future< bool> - Whether the device implements Android 16's per-app "launch via NFC" allowlist.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openTagIntentPreferenceSettings(
) → Future< bool> - Opens the system screen where the user changes that -- Settings > Apps > Special app access > Launch via NFC.
-
resetDiscoveryTechnology(
) → Future< void> - Puts discovery back to the system default.
-
setDiscoveryTechnology(
{required Set< NfcPollTech> poll, required Set<NfcListenTech> listen}) → Future<void> - Restricts what the controller polls for, and what it answers as, while this activity is in the foreground.
-
takeInitialTag(
) → Future< NfcTag?> - The tag whose intent launched the app, if the app was launched by a tap.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → NfcUtilAndroid
-
no setter