I am trying to write a simple application for interacting with NFC tags, but I can not get my phone to do anything other than launch the default NFC tag. I just want to be able to intercept any tag that I scan, determine if it has some data on it, and take appropriate action.
Currently my manifest file looks like
<uses-sdk android:minSdkVersion="10" /> <uses-feature android:name="android.hardware.nfc" android:required="true"/> <uses-permission android:name="android.permission.NFC"/> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".NfcActivity" android:label="@string/app_name"> <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> </activity> </application>
However, when I scan an NFC tag, I never see an activity start. Am I missing something? I tried to place an intent filter inside the BroadcastReceiver and no luck and ...
android android-intent nfc
Flyingstreudel
source share