| Os motores de busca de Datasheet de Componentes eletrônicos |
|
AN4430 Folha de dados(PDF) 21 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4430 Folha de dados(HTML) 21 Page - STMicroelectronics |
|
21 / 42 page ![]() DocID025722 Rev 1 21/42 AN4430 How to create an Android Application for ST dual memories 41 2.4 Setup Android Manifest file Once the project creation first step is completed, to use NFC functionality, developer has to configure properly the android application settings in the AndroidManifest.xml. 2.4.1 NFC permission In order to use NFC capability, application must request the NFC permission. To do so, this request must be specified in the manifest file by the following declaration: 2.4.2 NFC feature Specify that the application uses NFC by adding the following declaration: In this way, the application is known as not functional if the NFC feature is not available on the android device. 2.4.3 Intent filtering settings As seen in the application overview section, component can be declared to be NFC intent handler capable. To do so, an intent filter must be declared. Actually the application identified by com.example.myfirstnfcapp in the manifest file is composed by a single component which is an activity. This activity known as the main activity already has an intent filter declaration: This intent filter is declared specifically for main activity component to let Android System to know which activity component to start on user request. As the application get a single activity and as NFC intent can be handled in this main activity we may declares a new intent filter to handle NDEF message when TAG is discovered. In case activity component has to manage every kind of NDEF message we may add the following intent filter declaration (solution that we keep for our source code example): <uses‐permission android:name="android.permission.NFC" /> <uses‐feature android:name="android.hardware.nfc" android:required="true" /> <intent‐filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent‐filter> <intent‐filter> <action android:name="android.nfc.action.NDEF_DISCOVERED"/> </intent‐filter> |
|
Ligação URL |
| ALLDATASHEET é útil para você? [ DONATE ] |
Sobre Alldatasheet | Publicidade | Contato conosco | Privacy Policy | Link para a ficha técnica | roca de Link | Lista de Fabricantes 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 |