Skip to content Skip to sidebar Skip to footer

Flutter Nfc: How To Prevent/stop "new Tag Scanned" Default Activity In Flutter Android Build?

Everyone I'm using NFC plugin 'nfc_in_flutter' in my flutter app but I'm facing 'New Tag Scanned' issue in android build. Whenever I scan tag, First time, it works good but on seco

Solution 1:

You have configured the plugin to only read one card

try changing .readNDEF(once: true, readerMode: NFCDispatchReaderMode())

to .readNDEF(once: false, readerMode: NFCDispatchReaderMode())

so you don't ask the plugin to only read one card.

Update

I'm not a flutter expert but the use of timeout and first on the await means you will cancel waiting for a tag after 10 seconds and only wait for the first event before cancelling waiting for NFC events. Both of these might be a reason why it only responds to the first NFC card.

Post a Comment for "Flutter Nfc: How To Prevent/stop "new Tag Scanned" Default Activity In Flutter Android Build?"