| 전자부품 데이터시트 검색엔진 |
|
AN4430 데이터시트(PDF) 21 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4430 데이터시트(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> |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 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 |