Actually I did find a solution and also a bug I guess.
First, if anyone is interested in the solution for getting certain NFC tag contents to different activities without launching the main activity each time the NFC is read, here it is: create a separate activity for reading NFC tags, let's say that will be called NFCActivity; then, in the manifest editor replace "AddActivityText(
main, <intent-filter>" with "AddActivityText(
nfcactivity, <intent-filter>" so that activity will take care or reading; be sure that on the Create sub for NFCActivity
not to load a layout, so nothing will come up; in the NFCActivity Resume sub go ahead and do the reading - you should store the NFC uri/text in a global variable, so that is available through other activities i.e. where you need it. That's it!
Second, the bug: I have to say declaring two static filters for NFC works. Let's say I write the following in the manifest editor:
AddActivityText(main, <intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="http"
android:host="www.mysite.com" />
</intent-filter>)
AddActivityText(nfc, <intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="http"
android:host="www.yoursite.com" />
</intent-filter>)
By doing so, each NFC tag that has the URI set to
http://www.mysite.com/ will send the info to Main activity, and then the contents. For instance, if the URI on the NFC tag is
http://www.mysite.com/MyOwnNFCtag then the Main activity would receive "
MyOwnNFCtag". That's fine. Here's the problem: if you have a second NFC tag that says
http://www.yoursite.com/MyOwnNFCtag then that would be read by the NFC activity (according to the manifest editor),
but the text being received will be "
m/MyOwnNFCtag" instead of "
MyOwnNFCtag". That is because
www.mysite.com, which is first declared in the manifest editor, is two characters shorter than
www.yoursite.com, which is declared second. So when cutting to the actual text being transferred to the activity, only the length of the first URI matters. That's the bug.
Hope it helps!
Adrian