nfcim / flutter_nfc_kit

Flutter plugin to provide NFC functionality on Android and iOS, including reading metadata, read & write NDEF records, and transceive layer 3 & 4 data with NFC tags / cards
https://pub.dev/packages/flutter_nfc_kit
MIT License
202 stars 126 forks source link

Poll gives no result on Galaxy S24 (Android 14) #190

Open ThomasRuvoletto opened 1 week ago

ThomasRuvoletto commented 1 week ago

Hi, we have been working with flutter_nfc_kit on our application to interact with controllers with Mifare Ultralight and NfcV tags. This works for most phones we tried it with, however we cannot make it work with a Samsung S24 (Android 14 / OneUI 6.1 / Build number UP1A.231005.007.S921BXXS5AXJ8).

We tested the example application provided in the package, and even with it, we cannot trigger any reading: the FlutterNfcKit.poll() method is called but when the nfc tag is approached, we have no readings on the phone, and after 20 seconds a TimeoutException is triggered: Screenshot_20241118_114428

With the same phone, we tried using NFC Tools app, which successfully identifies the tags.

The example application works with other smartphones: image

Additionally, we tried adding the TAG_DISCOVERED intent

<intent-filter>
    <action android:name="android.nfc.action.TAG_DISCOVERED"/>
</intent-filter>

and the demo app seems to detect the tags when approaching them (the phone vibrates) but only when the demo app is not in polling.

If I can provide some additional logs I'd be happy to, just tell me how.

Thank you.

ThomasRuvoletto commented 1 week ago

Possibly related to #152 ?

NebulaFox commented 4 days ago

I would like to add, I have found a similar problem. I made a quick NFC app in pure android and it worked correctly, so there would seem to be a problem in flutter_nfc_kit.

Also experienced the same problem on Samsung A55 Android 14.