Handling NFC tags with NDEF record using NFC Forum External Type

510 views
Skip to first unread message

Matthijs Langenberg

unread,
Apr 26, 2011, 6:27:03 AM4/26/11
to android-platform
Hi all,

The current dispatch system does not allow for specifying which NDEF
type and value an application could respond to. This means that I
cannot write an Activity which responds to a specific type of tags.
We are using tags of type TNF_EXTERNAL_TYPE, with a value of
urn:nfc:ext:nedap.com:healthcare. By using an NDEF intent filter, I
can only specify a mime-type.

<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<data android:mimeType="*/*" />
</intent-filter>

This does not catch tags of type TNF_EXTERNAL_TYPE. So every time a
tag is scanned, the activity chooser dialog is being shown to the
user. (if the default Tags application could be uninstalled, this
wouldn't be such a big issue for us).

Would it be possible to provide a mapping from all TNF types to mime/
types? For example.

<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<data android:mimeType="external/nedap.com:healthcare" />
</intent-filter>


Bests,

Matthijs

Matthijs Langenberg

unread,
May 26, 2011, 4:29:59 PM5/26/11
to android-platform
Code is King. Follow-up is at: https://review.source.android.com/23162

Proposal is to map the External RTD directly to a MIME type.

So urn:nfc:ext:nedap.com:healthcare, would be mapped to x-ndef/x-
external-rtd; name="nedap.com:healthcare".

On Apr 26, 12:27 pm, Matthijs Langenberg <mlangenb...@gmail.com>
wrote:
> Hi all,
>
> The current dispatch system does not allow for specifying whichNDEF
> type and value an application could respond to. This means that I
> cannot write an Activity which responds to a specific type of tags.
> We are using tags of type TNF_EXTERNAL_TYPE, with a value of
> urn:nfc:ext:nedap.com:healthcare. By using anNDEFintent filter, I
Reply all
Reply to author
Forward
0 new messages