Open kitkline opened 2 months ago
To add further to this we have boiled the code down to the absolute minimum and the basic issue (Android) only is that 'await NfcManager.getTag()' simply never resolves. The NFCManager is running and once the app is on that screen the normal android phone default response to a nearby tag no longer occurs - so clearly the app has grabbed NFC as the manager starts - but when an tag is close NfcManager.getTag() does not resolve. Could this be something to do with how android sends the tag event on older phones (A10 running Android 11 which can run the app NFC tools just fine)
To add further to this we have also tried on a Google Pixel 5 running Android 14 and found the minimal example works. In summary an Android 11 device does not work and an Android 14 does. We would like to support older devices so if it is possible to get some advice that would me much appreciated...
Many thanks for such an awesome module!
Cheers Kit
hey @kitkline which kind of card are you using? what is the output of reading card in iPhone? is there any information about the card that you are trying to read?
Hi all, advice or help appreciated (ps - awesome tool!)
Following the documentation we have built NFC tag scanning into our app and works perfectly on IOS but on Android the tag is not read (to tag is ever returned from await NfcManager.getTag()
Checked - the phone is NFC capable and the app NFC tools on the phone can read the tag (i.e issue is in our code - not in the phone).
Checked - AndroidManifest.xml contains:
After the tech is launched by the user tapping the 'scan' button there is no error but scanning the tag does nothing. Pairing the phone with Android studio we see the following in logcat:
2024-09-19 23:05:01.901 14222-14419 ReactNativeNfcManager org.gearlog.app D isSessionAvailable: false 2024-09-19 23:05:01.905 14222-14419 ReactNativeNfcManager org.gearlog.app D registerTagEvent 2024-09-19 23:05:01.908 14222-14419 ReactNativeNfcManager org.gearlog.app I enableForegroundDispatch, enable = true
And then nothing else
Phone is Samsung A10 running Android 11 (it's a cheap old phone we used for physical testing - but should work given that NFC tools works?)
How can we generate more debug or logging to help resolve?
Code follows...