How To Make Android Application Listen To Specific NFC Chip?
I'm creating application that do some action if hit NFC chip , I know the following information about NFC in Android please correct me if I am wrong you can't register actions of
Solution 1:
According the the Android Developer site, it is possible for your app to filter NFC intents such as ACTION_NDEF_DISCOVERED.
Solution 2:
First register your app in the manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.survivingwithandroid.nfc" >
....
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain"/>
</intent-filter>
<manifest>
Then you should use foreground dispatch (foreground app). Finally you use NFCAdapter to read the content (onNewIntent). I wrote a detailed posts about NFC if you like give a look.
Post a Comment for "How To Make Android Application Listen To Specific NFC Chip?"