Provides access to Near Field Communication (NFC) functionality, allowing applications to connect
to NFC tags, then transmit and recieving data. A "tag" may actually be another device that appears
as a tag.
Here's a summary of the classes:
- {@link android.nfc.NfcAdapter}
- This represents the device's NFC adapter, which is your entry-point to performing NFC
operations. Once you acquire an instance with {@link android.nfc.NfcAdapter#getDefaultAdapter}, you
can create connections to tags.
- {@link android.nfc.NdefTag} and {@link android.nfc.Tag}
- These objects represent a tag. A tag is a thing that the NFC-enabled device can
communicate with when within range. Usually, you'll work with {@link android.nfc.NdefTag}, which
represents a tag that's compliant with the NFC Data Exchange Format (NDEF); a {@link
android.nfc.Tag} represents a generalized tag. Note that {@link android.nfc.NdefTag} extends
{@link android.nfc.Tag}.
- {@link android.nfc.NdefTagConnection} and {@link android.nfc.RawTagConnection}
- These objects represent a connection to a tag, respective to the type of tag connected
(either {@link android.nfc.NdefTag} or {@link android.nfc.Tag}). Note that {@link
android.nfc.NdefTagConnection} extends {@link android.nfc.RawTagConnection}.
- {@link android.nfc.NdefMessage}
- Represents an NDEF data message, which is the standard format in which "records"
carrying data are transmitted between devices and tags. Your application can receive these
messages from an {@link android.nfc.NdefTagConnection}.
- {@link android.nfc.NdefRecord}
- Represents a record, which is delivered in a {@link android.nfc.NdefMessage} and describes the
type of data being shared and carries the data itself.
Note:
Not all Android-powered devices provide NFC functionality.