I am writing an App that starts when a Tag with plaintext is read. It takes the integer saved on it to search in a database for some stuff. I like it that it starts and searches automatically, but i have one problem: The App has an Activity to write/overwrite Tags. To get there you have to tap a button. When I try to overwrite (write int into editText and activate writing per tap on button) a tag, it changes the activity and searches in database (when the tag has already an id). When I try to use enabled foregrounddispatcht, it doesn't change the activity, but I am no longer able to detect the tag... Any suggestions? ;)
btw. NFC is a completely new subject for me.
Manifest
<activity
android:noHistory="true"
android:name=".WriteNfcTagActivity"
android:label="@string/title_activity_write_nfc_tag">
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain" />
</intent-filter>
</activity>