Thanks, I had been switching between some different Intent Filters and
hadn't returned it to proper format. I had changed the mime type and had
forgotten to change it in the manifest. And I had left the "l" out of
<intent-filter>. Thanks for getting me to take a second look at it!
For external types I have figured out how to do it. If anyone else is
wondering how to do it, here is what I did.
Manifest file:
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<catagory android:name="android.intent.category.DEFAULT"/>
<data android:scheme="vnd.android.nfc"
android:host="ext"
android:pathPrefix="/mysite.com:a" />
</intent-filter>
Setting up the Foreground Dispatch
mPendingIntent = PendingIntent.getActivity(this, 0, new
Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0);
IntentFilter ndef = new
IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);
try{
ndef.addDataScheme("vnd.android.nfc");
ndef.addDataAuthority("ext", null);
ndef.addDataPath("/mysite.com:a", 0);
}
catch (Exception e)
{
throw new RuntimeException("fail", e);
}
mFilters = new IntentFilter[]{ ndef };
I hope it helps someone!
--
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