Novadart / react-native-nfc

This project has the goal of making it easy (or easier) to scan NFC tags and read the NDEF records they contain.
MIT License
76 stars 57 forks source link

tech-list README reference issue - subtle pain point #7

Open smitch88 opened 7 years ago

smitch88 commented 7 years ago

I think the way you are defining the tech-list in the README.md is incorrect for capturing a multitude of tag types. In its current form it acts as a logical AND but I think you really want this list to act like an OR. I was getting errors in the README.md format (e.g, showing the default nfc reader tag read) but switched to something like...

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
  <tech-list>
    <tech>android.nfc.tech.Ndef</tech>
  </tech-list>
  <tech-list>
    <tech>android.nfc.tech.MifareUltralight</tech>
  </tech-list>
  <tech-list>
    <tech>android.nfc.tech.MifareClassic</tech>
  </tech-list>
</resources>

And now it actually seems to read correctly across various tag types that I am using.

Great work btw on the library!

giordy commented 7 years ago

Thanks for reporting this! I must admit it is rather weird, "tech-list" suggests in fact to add a list of techs you would support. Besides, how would it work as a "AND" o.O a card usually contains 1 chip tech AFAIK (but I could be wrong)

smitch88 commented 7 years ago

I was using an app NFC tools to read tags and most tags do have multiple types they support and list themselves as what they support. For example, the ones I was reading supported ndef, nfcf, and one other one that I can't remember off the top of my head. Anyway, you could AND those to be more restrictive so it suits a very specific read use case but I found it quite annoying to work with it like that.

giordy commented 7 years ago

ok, interesting ^^ I will udpate the README