Filter nfc tag urls using the <data> element in the manifest?
<p>I have a nexus-s, and I have an nfc tag with the following data written into it:</p>

<pre><code>http://www.example.com/abc
</code></pre>

<p>When the tag is discovered by the nexus-s, I get a list of two applications that can handle a tag read:</p>

<pre><code>tags (included with the nexus-s I think)
MyTagReadingApp (my own demo app)
</code></pre>

<p>This is the manifest for my demo app:</p>

<pre><code>&lt;activity 
  android:name=".activities.ActivityReadTag" 
  android:configChanges="keyboardHidden|orientation"&gt;
  &lt;intent-filter&gt;
    &lt;action android:name="android.nfc.action.TAG_DISCOVERED"/&gt;
    &lt;category android:name="android.intent.category.DEFAULT" /&gt;
  &lt;/intent-filter&gt;
&lt;/activity&gt;
</code></pre>

<p>So my app gets invoked any time <em>any</em> nfc tag is read. I want it to only appear in the list of apps that can handle a tag read if there is a url data in the tag and it is part of my particular www.example.com domain. Something like:</p>

<pre><code>&lt;activity 
  android:name=".activities.ActivityReadTag" 
  android:configChanges="keyboardHidden|orientation"&gt;
  &lt;intent-filter&gt;
    &lt;action android:name="android.nfc.action.TAG_DISCOVERED"/&gt;
    &lt;category android:name="android.intent.category.DEFAULT" /&gt;

    &lt;data
      android:scheme="http"
      android:host="www.example.com"
      android:pathPattern="/" /&gt;

  &lt;/intent-filter&gt;
&lt;/activity&gt;
</code></pre>

<p>I was hoping the  tag would work here, but doesn't seem to. This technique works for urls elsewhere like for hyperlinks. Not sure if the sdk supports this yet?</p>

<p>Thank you</p>

<p>--------- Update ---------------</p>

<p>Looking at DDMS, I see the following when making contact with the tag:</p>

<pre><code>Starting: Intent { 
  act=android.nfc.action.NDEF_DISCOVERED 
  dat=http://example.com/foo/1234 flg=0x10000000 (has extras) 
} from pid 246

Starting: Intent { 
  flg=0x10000000 cmp=com.android.nfc3/com.android.nfc.TechListChooserActivity 
  (has extras) 
} from pid 246
</code></pre>

<p>so I tried updating my manifest to: </p>

<pre><code>&lt;activity 
  android:name=".activities.ActivityReadTag" 
  android:configChanges="keyboardHidden|orientation"&gt;

  &lt;intent-filter&gt;
    &lt;action
      android:name="android.nfc.action.NDEF_DISCOVERED" /&gt;
</code></pre>

<p>still no luck though. I'm using api 10 (2.3.3).</p>
