capawesome-team/capacitor-nfc

feat: Ndef Format with optional NdefRecord provided

easpinall opened this issue · 4 comments

Is your feature request related to a problem? Please describe:

In practice when a user needs to load data onto the NFC tag and its not yet NdefFormatted you currently need to format it first and then do a second read (nfcTagScanned) event to be able to write the initial data that was intended since you can't currently format and write in the same event process.

Describe the solution you'd like:

Currently when the tag is formatted for Ndef its writing a blank Ndef record to the tag. If the Nfc.format() command could take a optional NdefRecord as a parameter it would allow for the initial data to be written in the same event process as the formatting process.

Describe alternatives you've considered:

Double tapping the tag but this isn't user friendly for the end user or alternatively allow for a write() after the format() command, currently this gives an error stating that the NFC tag isn't Ndef formatted yet

Additional context:

Screenshot 2023-08-18 160236

@easpinall Thank you for your request. Sorry for my late response. I am currently on vacation.
It should already be possible to do this in „one step“, see #17 (comment)

Thanks, we have tried that and getting the same problem as @meisterm which is also depicted in the screen shot attached above.

I will check this and get back to you.

I just posted a comment to the discussion: #17 (reply in thread)
I close this issue as duplicate of #17

We will continue there so I don't have to repost everything.