Reputation: 10589
Today I managed to write a small app with three pages:
I also managed to read nfc tags and to print out the information I got from the nfc tag but there are a few questions I have now:
When I am at my Menu Page and place the Tag to read the NFC my Start-Page appears automatically but I want my NFC Page to appear automatically. How can I do that?
I made my app to start automatically when an nfc tag is placed near my smartphone. How can I make the app appear in the list of active and started apps? When I start my app manually it appears in the list of all apps running. If I start my ap automatically using a nfc tag it does not appear in the list of all apps running.
Upvotes: 1
Views: 2658
Reputation: 6461
To always open your NFC Page when tapped, move TECH_DISCOVERED
intent-filter under NFC page activity entry.
<intent-filter>
<action android:name="android.nfc.action.TECH_DISCOVERED" />
</intent-filter>
use singleTask
launch mode for your NFC Page activity
<activity android:name=".NFCPage"
android:label="@string/nfc_page"
android:launchMode="singleTask">
Upvotes: 3