Good idea! Thanks for the hint.

If the data tag contains a pathPrefix, then all tags which match that prefix 
are recognized (i.e. the application is started if such a tag is read). This 
solves my problem, i.e. I could use
        <data android:scheme="http" android:host="test.com" 
android:pathPrefix="/nfctest/" />
as data field (note that leading "/" is mandatory in the path).

Alternatively, also a pathPattern can be used, e.g. for my application
        <data android:scheme="http" android:host="test.com" 
android:pathPattern="/nfctest/.*" />


Best wishes
Dominik


-----Original Message-----
From: Michael Roland [mailto:[email protected]] 
Sent: Montag, 27. Juni 2011 14:07
To: [email protected]
Cc: Gruntz Dominik
Subject: Re: NFC: NDEF messages

Hallo Dominik,

> In the definition of the intent-filter I cannot use the android:path 
> part as this one matches only if it is an exact match, i.e. in the 
> above example only if the tag contains the URL 
> http://commonsware.com/nfctest. It is not possible to add wildcards in 
> the path part. But somewhere I have to add the tag specific data!

Have you tried using android:pathPattern or android:pathPrefix? I haven't 
tested, but I would have expected these attributes to work with NFC intent 
filters too...

br,
Michael

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to