/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/tech/ |
NdefTagTester.java | 26 import android.nfc.tech.Ndef; 34 * {@link TagTester} for NDEF tags. It writes a semi-random NDEF tag with a random id but 43 private static final String PAYLOAD = "CTS Verifier NDEF Tag"; 55 if (tech.equals(Ndef.class.getName())) { 56 Ndef ndef = Ndef.get(tag); local 57 return ndef != null && ndef.isWritable() [all...] |
/frameworks/base/core/java/android/nfc/ |
NdefMessage.java | 23 * Represents an NDEF (NFC Data Exchange Format) data message that contains one or more {@link 25 * <p>An NDEF message includes "records" that can contain different sets of data, such as 26 * MIME-type media, a URI, or one of the supported RTD types (see {@link NdefRecord}). An NDEF 27 * message always contains zero or more NDEF records.</p> 37 * Create an NDEF message from raw bytes. 46 throw new FormatException("Error while parsing NDEF message"); 51 * Create an NDEF message from NDEF records. 59 * Get the NDEF records inside this NDEF message [all...] |
NdefRecord.java | 29 * Represents a logical (unchunked) NDEF (NFC Data Exchange Format) record. 30 * <p>An NDEF record always contains: 38 * representation may be chunked across several NDEF records when the payload is 44 * Indicates no type, id, or payload is associated with this NDEF Record. 83 * type is not explicitly encoded within the NDEF Message. 91 * NDEF Record. 102 * The NFC Forum NDEF Specification v1.0 suggests for NDEF parsers to treat this 214 * Construct an NDEF Record. 216 * Applications should not attempt to manually chunk NDEF Records - th [all...] |
/frameworks/base/core/java/android/nfc/tech/ |
Ndef.java | 33 * Provides access to NDEF content and operations on a {@link Tag}. 35 * <p>Acquire a {@link Ndef} object using {@link #get}. 37 * <p>NDEF is an NFC Forum data format. The data formats are implemented in 44 * formatted to contain NDEF data. 52 * {@link Ndef} on NFC Forum Tag Types 1-4, and implement all NDEF operations 55 * <p>Some vendors have there own well defined specifications for storing NDEF data 57 * should enumerate and implement {@link Ndef} under these vendor specifications 60 * <code>com.nxp.ndef.mifareclassic</code>. 63 * implement {@link Ndef} on MIFARE Classic tags formatted to NDEF [all...] |
NdefFormatable.java | 32 * Provide access to NDEF format operations on a {@link Tag}. 37 * class for tags for which it can format to NDEF. 39 * <p>Unfortunately the procedures to convert unformated tags to NDEF formatted 54 * This indicates the tag is not NDEF formatable by this Android device. 56 * @param tag an NDEF formatable tag 57 * @return NDEF formatable object 77 * Format a tag as NDEF, and write a {@link NdefMessage}. 89 * @param firstMessage the NDEF message to write after formatting, can be null 92 * @throws FormatException if the NDEF Message to write is malformed 99 * Formats a tag as NDEF, write a {@link NdefMessage}, and make read-only [all...] |
/external/libnfc-nxp/src/ |
phFriNfc_ISO15693Map.h | 20 * \brief NFC Ndef Mapping For ISO-15693 Smart Card. 39 /* 3 BYTE value identifier for NDEF TLV */ 42 /* Get the NDEF TLV VALUE field block and byte address */ 55 * \brief \copydoc page_ovr Initiates Reading of NDEF information from the Remote Device. 57 * The function initiates the reading of NDEF information from a Remote Device. 65 * \param[in] PacketData Pointer to a location that receives the NDEF Packet. 67 * \param[in,out] PacketDataLength Pointer to a variable receiving the length of the NDEF packet. 78 * \retval NFCSTATUS_INVALID_DEVICE_REQUEST If Previous Operation is Write Ndef and Offset 99 * \brief \copydoc page_ovr Initiates Writing of NDEF information to the Remote Device. 101 * The function initiates the writing of NDEF information to a Remote Device [all...] |
phFriNfc_DesfireMap.h | 19 * \brief NFC Ndef Mapping For Desfire Smart Card. 52 #define PH_FRINFC_NDEFMAP_DESF_NDEF_CHK_OP 4 /*!< Desfire Operation Flag is Check Ndef */ 62 * \name NDEF Mapping - states of the Finite State machine 76 #define PH_FRINFC_NDEFMAP_DESF_STATE_CHK_NDEF 10 /*!< Check Ndef is in progress */ 78 #define PH_FRINFC_NDEFMAP_DESF_NDEF_CNTRL_TLV 0x04 /*!< Specifies the NDEF File Cntrl TLV */ 104 /*!< Following two indexes represents the NDEF file identifier in CC*/ 108 /*!< Following two indexes represents the NDEF file size in CC */ 112 /*!< Specifies the index of the NDEF file READ access byte in CC */ 115 /*!< Specifies the index of the NDEF file WRITE access byte in CC */ 119 /* Macros to find Maximum NDEF File Size* [all...] |
phFriNfc_NdefRecord.h | 19 * \brief NFC Ndef Record component header file. 36 * \name NDEF Record Tools Header 55 * This component implements Ndef Message composing and processing routines. 57 * The Ndef Record is a data structure used by NFC Forum compliant devices for data transfer. 60 * \li Interprete a given buffer by listing the embedded NDEF records 61 * \li Extract a Ndef record from a given buffer 62 * \li Compose a NDEF record and optionally append it to an existing buffer/message 68 * \brief The TNF specifies the structure of the NDEF Record TYPE field. 70 * \name NDEF Record Type Name Format 86 * \brief These are the flags specifying the content, structure or purpose of a NDEF Record [all...] |
phFriNfc_FelicaMap.h | 19 * \brief NFC Ndef Mapping For Felica Smart Card. 47 /* NDEF Mapping - states of the Finite State machine */ 50 #define PH_FRINFC_NDEFMAP_FELI_STATE_CHK_NDEF 3 /* Ndef Complient State*/ 56 #define PH_NFCFRI_NDEFMAP_FELI_STATE_WR_EMPTY_MSG 9 /* write Empty Ndef Msg*/ 69 #define PH_FRINFC_NDEFMAP_FELI_WR_EMPTY_MSG_OP 19 /* To Process the Empty NDEF Msg while erasing the NDEF data*/ 140 * \brief \copydoc page_ovr Initiates Reading of NDEF information from the Remote Device. 142 * The function initiates the reading of NDEF information from a Remote Device. 150 * \param[in] PacketData Pointer to a location that receives the NDEF Packet. 152 * \param[in,out] PacketDataLength Pointer to a variable receiving the length of the NDEF packet [all...] |
phFriNfc_MifareStdMap.h | 19 * \brief NFC Ndef Mapping For Remote Devices. 52 * \name NDEF Mapping 63 /*! \defgroup grp_fri_nfc_ndef_map NDEF Mapping for Remote Devices 65 * This component encapsulates Ndef Registration and Listening data and functionality. 70 * \name NDEF Mapping - states of the Finite State machine 78 #define PH_FRINFC_NDEFMAP_STATE_CHK_NDEF_COMP 4 /*!< Check Ndef is going on */ 80 #define PH_FRINFC_NDEFMAP_STATE_WR_NDEF_LEN 6 /*!< Write NDEF TLV LEngth*/ 81 #define PH_FRINFC_NDEFMAP_STATE_RD_TO_WR_NDEF_LEN 7 /*!< read to write the Ndef TLV*/ 83 #define PH_FRINFC_NDEFMAP_STATE_RD_BEF_WR 9 /*!< Read the NDEF TLV block before starting write */ 84 #define PH_FRINFC_NDEFMAP_STATE_WR_TLV 10 /*!< Read the NDEF TLV block before starting write * [all...] |
phFriNfc_TopazMap.h | 19 * \brief NFC Ndef Mapping For Mifare UL Card. 71 #define PH_FRINFC_TOPAZ_STATE_CHK_NDEF 3 /*!< Check Ndef is going on */ 74 #define PH_FRINFC_TOPAZ_STATE_WRITE_NMN 6 /*!< Write ndef magic number */ 76 #define PH_FRINFC_TOPAZ_STATE_WR_CC_OR_TLV 8 /*!< Write CC or NDEF TLV */ 129 PH_FRINFC_TOPAZ_WR_CC_BYTE0, /*!< CC Byte 0 = 0xE1 ndef magic number */ 138 PH_FRINFC_TOPAZ_DYNAMIC_INIT_CHK_NDEF, /*!< Internal state to represent the parsing of card to locate Ndef TLV*/ 153 #define PH_FRINFC_TOPAZ_NDEF_T 0x03 /*!< NDEF TLV = 0x03 */ 154 #define PH_FRINFC_TOPAZ_PROP_T 0xFD /*!< NDEF TLV = 0xFD */ 159 #define PH_FRINFC_TOPAZ_MAX_CARD_SZ 0x60 /*!< Send Length for Read Ndef */ 168 #define PH_FRINFC_TOPAZ_WR_A_BYTE 0x02 /*!< Send Length for Write Ndef */ [all...] |
phFriNfc_NdefMap.h | 19 * \brief NFC Ndef Mapping For Different Smart Cards. 50 * \name NDEF Mapping 63 /** \defgroup grp_fri_nfc_ndef_map NDEF Mapping Component 65 * This component implements the read/write/check NDEF functions for remote devices. 66 * NDEF data, as defined by the NFC Forum NDEF specification are written to or read from 68 * Please notice that the NDEF mapping command sequence must 86 * rule are specific to the NDEF mapping of certain card / remote device types and separately noted, 92 * \name NDEF Mapping - specifies the different card types 118 #define PH_FRINFC_NDEFMAP_EMPTY_NDEF_MSG {0xD0, 0x00, 0x00} /**< \internal Empty ndef message * [all...] |
phFriNfc_MifareULMap.h | 19 * \brief NFC Ndef Mapping For Mifare UL Card. 52 #define PH_FRINFC_NDEFMAP_MFUL_STATE_CHK_NDEF_COMP 3 /*!< Check Ndef is going on */ 53 #define PH_FRINFC_NDEFMAP_MFUL_STATE_FND_NDEF_COMP 4 /*!< to find the NDEF TLV */ 126 #define PH_FRINFC_NDEFMAP_MFUL_WR_A_BLK 0x05 /*!< Send Length for Write Ndef */ 127 #define PH_FRINFC_NDEFMAP_MFUL_MAX_SEND_BUF_TO_READ 0x01 /*!< Send Length for Read Ndef */ 169 * \brief \copydoc page_ovr Initiates Reading of NDEF information from the Remote Device. 171 * The function initiates the reading of NDEF information from a Remote Device. 179 * \param[in] PacketData Pointer to a location that receives the NDEF Packet. 181 * \param[in,out] PacketDataLength Pointer to a variable receiving the length of the NDEF packet. 192 * \retval NFCSTATUS_INVALID_DEVICE_REQUEST If Previous Operation is Write Ndef and Offse [all...] |
phFriNfc_NdefReg.h | 19 * \brief NFC Ndef Registration / Listening. 36 * \name NDEF Registry and Listening 48 * NDEF Registration And Listening - States of the Finite State machine 56 * NDEF Registration And Listening internal definitions 64 /** \defgroup grp_fri_nfc_ndef_reg NDEF Registry 66 * This component implements the NDEF Registration and Listening functionality. 71 * \name NDEF Registration And Listening callback and node definitions 84 * \brief NDEF Callback 88 * Upon reception of a NDEF record the component calls into the function registered as a listener 89 * for a NDEF type. The function must be compatible to the declaration of the pointer described i [all...] |
phLibNfc_ndef_raw.c | 68 /* Response callback for Check Ndef */ 72 /* Response callback for Ndef Write */ 76 /* Response callback for Ndef Read*/ 92 /* Response callback for Search Ndef Content */ 96 /* Response callback for Ndef Record Type Discovery */ 100 /* Response callback for Check Ndef timer callback */ 103 /*Callback for Presence check call from Chk Ndef*/ 112 * This function reads an NDEF message from already connected tag. 113 * the NDEF message is read starting after the position of the 159 /*no Ndef Support in tag* [all...] |
phFriNfc_MifULFormat.h | 19 * \brief NFC Ndef Formatting For Mifare standard card. 72 #define PH_FRINFC_MFUL_FMT_RO_NDEF_PARSE_RD_BYTES 12 /*!< Read bytes from the card for parsing NDEF */ 123 #define PH_FRINFC_MFUL_FMT_NON_NDEF_COMPL 0 /*!< Card is not ndef compliant */ 124 #define PH_FRINFC_MFUL_FMT_NDEF_COMPL 1 /*!< Card is ndef compliant */ 163 * card would be properly initialized and Ndef Compliant. 181 * \brief Initiates the conversion of the already NDEF formatted tag to READ ONLY. 183 * \copydoc page_ovr The function initiates the conversion of the already NDEF formatted 184 * tag to READ ONLY.After this formation, remote card would be properly Ndef Compliant and READ ONLY.
|
/packages/apps/Tag/res/xml/ |
filter_nfc.xml | 17 <!-- capture anything containing NDEF --> 19 <tech>android.nfc.tech.Ndef</tech>
|
/cts/tests/tests/ndef/ |
AndroidManifest.xml | 18 package="com.android.cts.ndef"> 26 android:targetPackage="com.android.cts.ndef" 27 android:label="CTS tests of NDEF data classes"/>
|
/packages/apps/Nfc/tests/src/com/android/nfc/snep/ |
SnepValidationClientTests.java | 57 Log.d(TAG, "Putting ndef message..."); 60 Log.d(TAG, "Getting ndef message..."); 82 Log.d(TAG, "Putting ndef message of size " + msg.toByteArray().length + "..."); 85 Log.d(TAG, "Getting ndef message..."); 109 Log.d(TAG, "Putting ndef message A..."); 111 Log.d(TAG, "Putting ndef message B..."); 118 Log.d(TAG, "Getting ndef message A..."); 127 Log.d(TAG, "Getting ndef message B..."); 151 Log.d(TAG, "Getting ndef message..."); 168 Log.d(TAG, "Putting ndef message of size " + msg.toByteArray().length + "...") [all...] |
/packages/apps/Nfc/src/com/android/nfc/snep/ |
SnepMessage.java | 53 public static SnepMessage getGetRequest(int acceptableLength, NdefMessage ndef) { 54 return new SnepMessage(VERSION, REQUEST_GET, 4 + ndef.toByteArray().length, 55 acceptableLength, ndef); 58 public static SnepMessage getPutRequest(NdefMessage ndef) { 59 return new SnepMessage(VERSION, REQUEST_PUT, ndef.toByteArray().length, 0, ndef); 66 public static SnepMessage getSuccessResponse(NdefMessage ndef) { 67 if (ndef == null) { 70 return new SnepMessage(VERSION, RESPONSE_SUCCESS, ndef.toByteArray().length, 0, ndef); [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/nfc/ |
ForegroundDispatch.java | 34 * based NDEF dispatch as well as all dispatched for NfcF tags. 61 IntentFilter ndef = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED); local 63 ndef.addDataType("*/*"); 68 ndef,
|
ForegroundNdefPush.java | 32 * An example of how to use the NFC foreground NDEF push APIs. 65 mText.setText("Tap another Android phone with NFC to push 'NDEF Push Sample'"); 70 // Create an NDEF message with some sample text 72 new NdefRecord[] { newTextRecord("NDEF Push Sample", Locale.ENGLISH, true)});
|
/frameworks/base/docs/html/guide/topics/nfc/ |
index.jd | 15 called NDEF (NFC Data Exchange Format).</p> 21 NDEF data in your applications and gives an overview of the framework APIs that support the basic 27 Android supports. When you are not working with NDEF data, or when you are working with NDEF
|
nfc.jd | 11 <li><a href="#ndef">How NFC tags are mapped to MIME types and URIs</a></li> 18 <li><a href="#ndef-disc">ACTION_NDEF_DISCOVERED</a></li> 24 <li><a href="#creating-records">Creating Common Types of NDEF Records</a> 34 <li><a href="#p2p">Beaming NDEF Messages to Other Devices</a></li> 40 receive NFC data in the form of NDEF messages and describes the Android framework APIs that support 41 these features. For more advanced topics, including a discussion of working with non-NDEF data, 45 <p>There are two major uses cases when working with NDEF data and Android:</p> 48 <li>Reading NDEF data from an NFC tag</li> 49 <li>Beaming NDEF messages from one device to another with <a href="#p2p">Android 54 <p>Reading NDEF data from an NFC tag is handled with the <a href="#tag-dispatch">tag dispatc [all...] |
/development/samples/ApiDemos/res/xml/ |
filter_nfc.xml | 22 <!-- capture all MIFARE Classics with NDEF payloads --> 26 <tech>android.nfc.tech.Ndef</tech>
|