Near field communication (NFC) overview
Stay organized with collections
Save and categorize content based on your preferences.
Near Field Communication (NFC) is a set of short-range wireless technologies,
typically requiring a distance of 4 cm or less to initiate a connection. NFC
lets you share small payloads of data between an NFC tag and an
Android-powered device, or between two Android-powered devices.
Tags can range in complexity. Simple tags offer just read and write semantics,
sometimes with one-time-programmable areas to make the card read-only. More
complex tags offer math operations, and have cryptographic hardware to
authenticate access to a sector. The most sophisticated tags contain operating
environments, allowing complex interactions with code executing on the tag. The
data stored in the tag can also be written in a variety of formats, but many of
the Android framework APIs are based around a NFC
Forum standard called NDEF (NFC Data Exchange
Format).
Android-powered devices with NFC simultaneously support two main modes of
operation:
- Reader/writer mode, allowing the NFC device to read and write passive
NFC tags and stickers.
- Card emulation mode, allowing the NFC device itself to act as an NFC
card. The emulated NFC card can then be accessed by an external NFC reader,
such as an NFC point-of-sale terminal.
- NFC Basics
- This document describes how Android handles discovered NFC tags and how it
notifies applications of data that is relevant to the application. It also
goes over how to work with the NDEF data in your applications and gives an
overview of the framework APIs that support the basic NFC feature set of
Android.
- Advanced NFC
- This document goes over the APIs that enable use of the various tag
technologies that Android supports. When you are not working with NDEF data,
or when you are working with NDEF data that Android cannot fully understand,
you have to manually read or write to the tag in raw bytes using your own
protocol stack. In these cases, Android provides support to detect certain
tag technologies and to open communication with the tag using your own
protocol stack.
- Host-based Card Emulation
- This document describes how Android devices can perform as NFC cards without
using a secure element, allowing any Android application to emulate a card
and talk directly to the NFC reader.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-11-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-14 UTC."],[],[],null,["# Near field communication (NFC) overview\n\nNear Field Communication (NFC) is a set of short-range wireless technologies,\ntypically requiring a distance of 4 cm or less to initiate a connection. NFC\nlets you share small payloads of data between an NFC tag and an\nAndroid-powered device, or between two Android-powered devices.\n\nTags can range in complexity. Simple tags offer just read and write semantics,\nsometimes with one-time-programmable areas to make the card read-only. More\ncomplex tags offer math operations, and have cryptographic hardware to\nauthenticate access to a sector. The most sophisticated tags contain operating\nenvironments, allowing complex interactions with code executing on the tag. The\ndata stored in the tag can also be written in a variety of formats, but many of\nthe Android framework APIs are based around a [NFC\nForum](http://www.nfc-forum.org/) standard called NDEF (NFC Data Exchange\nFormat).\n\nAndroid-powered devices with NFC simultaneously support two main modes of\noperation:\n\n1. **Reader/writer mode**, allowing the NFC device to read and write passive NFC tags and stickers.\n2. **Card emulation mode**, allowing the NFC device itself to act as an NFC card. The emulated NFC card can then be accessed by an external NFC reader, such as an NFC point-of-sale terminal.\n\n**[NFC Basics](/develop/connectivity/nfc/nfc)**\n: This document describes how Android handles discovered NFC tags and how it\n notifies applications of data that is relevant to the application. It also\n goes over how to work with the NDEF data in your applications and gives an\n overview of the framework APIs that support the basic NFC feature set of\n Android.\n\n**[Advanced NFC](/develop/connectivity/nfc/advanced-nfc)**\n: This document goes over the APIs that enable use of the various tag\n technologies that Android supports. When you are not working with NDEF data,\n or when you are working with NDEF data that Android cannot fully understand,\n you have to manually read or write to the tag in raw bytes using your own\n protocol stack. In these cases, Android provides support to detect certain\n tag technologies and to open communication with the tag using your own\n protocol stack.\n\n**[Host-based Card Emulation](/develop/connectivity/nfc/hce)**\n: This document describes how Android devices can perform as NFC cards without\n using a secure element, allowing any Android application to emulate a card\n and talk directly to the NFC reader."]]