| Electronic Components Datasheet Search |
|
AN4430 Datasheet(PDF) 23 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4430 Datasheet(HTML) 23 Page - STMicroelectronics |
|
23 / 42 page ![]() DocID025722 Rev 1 23/42 AN4430 How to create an Android Application for ST dual memories 41 In case developer expects his component is instantiate on ACTION_TAG_DISCOVERED intent he must simply declare the following intent filter in the AndroidManifest.xml file: 2.5 Android NFC Activities implementation As seen in previous sections, application is a set of components from different kind of family (ie. activities, services,..). Components may be started from intents sent by the Android System or from the application itself. In this case, the component known as the main one is started by the application upon user’s start application request. Once the activities has been declares with the associated intent filters in the androidManifest.xml file activity has to be implemented by a corresponding Java Class. In the studied case, developer has to implement the lifecycle activity callback, the NFC intent handling functionalities, and finally the NFC message treatment. Here is the provided implementation of the MainActvity automatically generated during project creation, referenced in the AndroidManifest.xml file that developer has to upgrade to support NFC feature. 2.5.1 Import NFC packages In order to support NFC functionality, developer imports NFC android packages first. With Eclipse IDE it can be automatically done while developer uses new objects. <intent‐filter> <action android:name="android.nfc.action.TAG_DISCOVERED"/> </intent‐filter> package com.example.myfirstnfcapp; import android.os.Bundle; import android.app.Activity; import android.view.Menu; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } } import android.nfc.NdefMessage; import android.nfc.NfcAdapter; |
|
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 |