Hallo Domnic,

> My resource file looks like
> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
>     <tech-list>
>         <tech>android.nfc.tech.NfcA</tech>
>         <tech>android.nfc.tech.NfcB</tech>
>         <tech>android.nfc.tech.NfcF</tech>
>         <tech>android.nfc.tech.NfcV</tech>
>         <tech>android.nfc.tech.Ndef</tech>
>         <tech>android.nfc.tech.NdefFormatable</tech>
>         <tech>android.nfc.tech.MifareClassic</tech>
>     </tech-list>
> </resources>

Right, this tech-list won't trigger on any tag. Take a look at the
documentation at [url]http://developer.android.com/reference/android/
nfc/NfcAdapter.html#ACTION_TECH_DISCOVERED[/url]. It says that <tech-
list> combines its <tech> entries with AND. So you are trying to
listen for a tag that is NfcA AND NfcB AND NfcF AND NfcV at the same
time. However a tag will only be detected as one RF technology.

To listen for multiple tag technologies you would need multiple <tech-
list> entries (they are then combined with logical OR.)

If you want to detect only MIFARE Classic, a filter like this would
suffice:
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <tech-list>
        <tech>android.nfc.tech.MifareClassic</tech>
    </tech-list>
</resources>

Of course every MIFARE tag uses the RF technology NfcA, so a filter
like this will also work:
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <tech-list>
        <tech>android.nfc.tech.NfcA</tech>
        <tech>android.nfc.tech.MifareClassic</tech>
    </tech-list>
</resources>

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to