Electronic Components Datasheet Search
  English  ▼

X  

AN4430 Datasheet(PDF) 23 Page - STMicroelectronics

Part # AN4430
Description  Designing an NFC Android Application for M24SR and M24LR devices
PDF  42 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4430 Datasheet(HTML) 23 Page - STMicroelectronics

Back Button AN4430 Datasheet HTML 19Page - STMicroelectronics AN4430 Datasheet HTML 20Page - STMicroelectronics AN4430 Datasheet HTML 21Page - STMicroelectronics AN4430 Datasheet HTML 22Page - STMicroelectronics AN4430 Datasheet HTML 23Page - STMicroelectronics AN4430 Datasheet HTML 24Page - STMicroelectronics AN4430 Datasheet HTML 25Page - STMicroelectronics AN4430 Datasheet HTML 26Page - STMicroelectronics AN4430 Datasheet HTML 27Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 23 / 42 page
background image
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; 



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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