okadan / flutter-nfc-manager

A Flutter plugin for accessing the NFC features on Android and iOS.
https://pub.dev/packages/nfc_manager
MIT License
210 stars 134 forks source link

NDEFformatable returning PlatformException(io_exception, null, null, null) #167

Open Adithyan2295 opened 12 months ago

Adithyan2295 commented 12 months ago

Screenshot 2023-11-28 at 11 35 11 AM

Screenshot_20231128-113741

I have been trying to write to a new card .. ndef.write() also returns the same error..If the card is not empty I can overwrite. Writing to a new card is the issue for me.

Running on Android 13 : Samsung Galaxy Tab Active 3

carki001 commented 10 months ago

Is it writable? Screenshot 2024-01-11 100654

hebaothman commented 5 months ago

Any news about this issue?

pranil-iottive commented 5 months ago

1718295127016 I'm also getting the same issue, with the same card sometimes the package gives this error PlatformException(io_exception, null, null, null) and after a few attempts, I'm getting a small detail with this message PlatformException(io_exception, Tag is not ndef, null, null)

Device Name. : Oneplus A6000 Os Version: Android 11

Adithyan2295 commented 5 months ago

@hebaothman @carki001 @pranil-iottive The issue I was facing was that ,Some cards have NDEF formattable technology which means when the card is empty the value is basically null.So some devices does not recognize this format.Once we write to the card the technology changes to just NDEF which we can overwrite however we like. My solution was to change the card that has by default NDEF technology which by default have a empty string instead of null when formatted or while writing for the first time.

This card fixed the issue for me: NTAG216 NFC Tags Cards. Search for NFC cards NTAG 213,215,216 my understanding is some devices does not accept NDEF formattable technology causing the issue when card is empty.

1000018818 Screenshot 2024-06-13 at 12 36 23 PM

philitell commented 4 months ago

Some tags use ndefformatable - this means that such tags can be formatted to ndef. nfc-manager fails to do so for some tags. Tags that are working: I'm using NTAG 213,215,216 tags. This tags can be formatted from ndefformatable to ndef with nfc-manager.

Tags that are failing: When i'm using Mifare Desfire EV3 tags (which are also ndefformatable) i'm getting PlatformException(io_exception, null, null, null) on await ndefFormatableTag.format(message);