0
votes

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>
1
See also this question. Have you confirmed that your tag really contains a MIME type record with media type "application/com.myorg.myapp" as the first record of the NDEF message?Michael Roland
thanks for your comment. I already read this question and follow it. you can see the content of nfc message. could you see this?stray.leone

1 Answers

0
votes

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>