stray.leone
stray.leone

Reputation: 339

How can I get the multiple NFC record after launching the app by AAR

After lauching the app by ARR, I read the intent and the intent has only ACTION.MAIN.

I follow the answer below but It doesn't work.


I write the mime-type data at first position in NFC tag and write the ARR-packagename at last position in NFC tag.

I also insert the intent-filter at manifest file

<intent-filter>
            <action android:name="android.nfc.action.NDEF_DISCOVERED" />

            <data android:mimeType="application/com.myorg.myapp" />

            <category android:name="android.intent.category.DEFAULT" />
 </intent-filter>

Upvotes: 0

Views: 644

Answers (1)

stray.leone
stray.leone

Reputation: 339

the app which read NFC tag must have two intent-filter sepearately my intent-filter in Manifest.xml is below

<intent-filter>
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.LAUNCHER" />
            <action android:name="android.intent.action.VIEW" />
            <action android:name="android.intent.action.MAIN" />

        </intent-filter>
        <intent-filter>
            <action android:name="android.nfc.action.NDEF_DISCOVERED" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="application/org.leonehouse.nfc" />
        </intent-filter>

Upvotes: 0

Related Questions