| Electronic Components Datasheet Search |
|
AN4430 Datasheet(PDF) 17 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4430 Datasheet(HTML) 17 Page - STMicroelectronics |
|
17 / 42 page ![]() DocID025722 Rev 1 17/42 AN4430 How to create an Android Application for ST dual memories 41 For more information about how to install and use eclipse or ADT according to its own development station, reader can refer to Android developer web site. 2.2 NFC Android API From Android point of view, NFC is a set of short-range wireless technologies requiring a distance of 4 cm or less to initiate a connection. User can exchange small payload of data between NFC capable android phone and an external solution (in our cast ST-M24SR or ST-M24LR products). Many of the android APIs are based around the NFC Forum standard called NDEF (NFC Data Exchange Format). To get further information on NDEF specification reader as to refer itself NDEF specification publicly accessible from NFC Forum web site. Android API is then able to handle 3 modes of operation: • Reader/writer mode – mode treated in this application note • P2P mode – not currently addressed in this application • Card emulation mode allowing the NFC device to act as an NFC Card and be addressed by an external NFC reader (not treat in the current application note). 2.2.1 Android.nfc Package This package which appears with the API 9 and enhanced by the next API revision gives the access to the Near Field Communication functionality on NFC capable Android. This package helps developer to easily read or write NDEF messages on an external NDEF compliant NFC Tag. Main class of the Android.nfc package • NfcAdapter This class maps the local android phone’s NFC adapter. NfcAdapter is then the entry point to perform NFC operations. Developer has to call the getDefaultAdapter() to retrieve the default NFC adapter. • NfcManager This class offers the NFC high level manager service used to obtain the instance of the NfcAdapter. The instance can be retrieved by the call of getSystemService(String) with NFC_SERVICE string given in parameter. • NdefMessage and NdefRecord NdefMessage class represents the NDEF data message object implementation while NdefRecord class represents the NDEF records carrying the NDEF message. Those classes can be mapped on the NDEF NFC Forum specification. To construct a NDEF message developer has to use the NdefMessage([byte]) call from a binary data that is parsed by android API on NdefMessage creation. If the developer expects to use typed data he may call NdefMessage(NderRecord, NdefRecords,….). NdefRecord object is created according to type of record message developer wants to store in NDefMessage (ie: RTD_TEXT, RTD_URI, RTD_SMART_POSTER, ..). RTD (Record Type Definition) are specified by the NFC Forum and can be retrieving from their web site. • NfcEvent Object used to wraps information associated with an NFC event usually included in callbacks from NfcAdapter. NfcEvent must be preferred to parameters in the |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |