Java android.nfc NfcAdapter fields, constructors, methods, implement or subclass

Example usage for Java android.nfc NfcAdapter fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.nfc NfcAdapter.

The text is from its open source code.

Field

StringACTION_NDEF_DISCOVERED
Intent to start an activity when a tag with NDEF payload is discovered.
StringACTION_TECH_DISCOVERED
Intent to start an activity when a tag is discovered and activities are registered for the specific technologies on the tag.
StringACTION_TAG_DISCOVERED
Intent to start an activity when a tag is discovered.
StringEXTRA_TAG
Mandatory extra containing the Tag that was discovered for the #ACTION_NDEF_DISCOVERED , #ACTION_TECH_DISCOVERED , and #ACTION_TAG_DISCOVERED intents.
StringEXTRA_NDEF_MESSAGES
Extra containing an array of NdefMessage present on the discovered tag.

This extra is mandatory for #ACTION_NDEF_DISCOVERED intents, and optional for #ACTION_TECH_DISCOVERED , and #ACTION_TAG_DISCOVERED intents.

When this extra is present there will always be at least one NdefMessage element.

StringEXTRA_ID
Optional extra containing a byte array containing the ID of the discovered tag for the #ACTION_NDEF_DISCOVERED , #ACTION_TECH_DISCOVERED , and #ACTION_TAG_DISCOVERED intents.
StringACTION_ADAPTER_STATE_CHANGED
Broadcast Action: The state of the local NFC adapter has been changed.
StringEXTRA_ADAPTER_STATE
Used as an int extra field in #ACTION_ADAPTER_STATE_CHANGED intents to request the current power state.
intSTATE_OFF
intSTATE_TURNING_ON
intSTATE_ON
intSTATE_TURNING_OFF
intFLAG_READER_NFC_A
Flag for use with #enableReaderMode(Activity,ReaderCallback,int,Bundle) .
intFLAG_READER_SKIP_NDEF_CHECK
Flag for use with #enableReaderMode(Activity,ReaderCallback,int,Bundle) .
intFLAG_READER_NO_PLATFORM_SOUNDS
Flag for use with #enableReaderMode(Activity,ReaderCallback,int,Bundle) .
StringEXTRA_READER_PRESENCE_CHECK_DELAY
Int Extra for use with #enableReaderMode(Activity,ReaderCallback,int,Bundle) .

Method

voiddisableForegroundDispatch(Activity activity)
Disable foreground dispatch to the given activity.
voiddisableForegroundNdefPush(Activity activity)
Disable NDEF message push over P2P.
voiddisableReaderMode(Activity activity)
Restore the NFC adapter to normal mode of operation: supporting peer-to-peer (Android Beam), card emulation, and polling for all supported tag technologies.
voidenableForegroundDispatch(Activity activity, PendingIntent intent, IntentFilter[] filters, String[][] techLists)
Enable foreground dispatch to the given Activity.
voidenableForegroundNdefPush(Activity activity, NdefMessage message)
Enable NDEF message push over NFC while this Activity is in the foreground.
voidenableReaderMode(Activity activity, ReaderCallback callback, int flags, Bundle extras)
Limit the NFC controller to reader mode while this Activity is in the foreground.
NfcAdaptergetDefaultAdapter(Context context)
Helper to get the default NFC Adapter.
booleanisEnabled()
Return true if this NFC Adapter has any features enabled.
booleanisNdefPushEnabled()
Return true if the NDEF Push (Android Beam) feature is enabled.
voidsetBeamPushUris(Uri[] uris, Activity activity)
Set one or more Uri s to send using Android Beam (TM).
voidsetBeamPushUrisCallback(CreateBeamUrisCallback callback, Activity activity)
Set a callback that will dynamically generate one or more Uri s to send using Android Beam (TM).