revtel / react-native-nfc-manager

React Native NFC module for Android & iOS
MIT License
1.35k stars 317 forks source link

NFC Manager sometimes deletes ndef from tag's available technologies #614

Closed MErenTalan closed 1 year ago

MErenTalan commented 1 year ago

Hi I'm writing an app for ndef read/write with react-native-nfc-manager. It successfully works most of the time but sometimes it deletes ndef from "available technologies". I can't write to nfc until clone from another ndef tag with ST25 app.

I couldn't find a way to add cloning on my app with react-native-nfc-manager. One time I achieved to fix the nfc with using direct bytes with writeNdefMessage but didn't work again.

How can I handle this situation on my app? My NFC Write code:

                try {
              await NfcManager.requestTechnology(NfcTech.Ndef)
              await NfcManager.ndefHandler.writeNdefMessage([
               0xD1,0x01,0x0B,0x55,0x04,0x67,0x6F,0x6F,0x67,0x6C,0x65,0x2E,0x63,0x6F,0x6D
              ]);

            } catch (error) {
              console.log(error);
            } finally {
              NfcManager.cancelTechnologyRequest().catch(() => 0);
            }
Ludeco27 commented 1 year ago

Hello my friend, how do I get in touch with you, I want to make an nfc apk, can you help me to get the values ​​right

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 5 days with no activity.