NFC tag write error: [Error: unsupported tag api]

23 views Asked by At

i m using react-native-nfc-manager to write and read nfc tags. while writing i dig into the error [Error: unsupported tag api] [Error: transceive fail]

write function is

`const bytes= [ 35807094 ]
    async function writeData() {
        try {
          // register for the NFC tag with NDEF in it
          let resp = await NfcManager.requestTechnology(NfcTech.Ndef, {
            alertMessage: 'Hold your phone close to the NFC tag.',
          });
        
          const tag = await NfcManager.getTag();
          console.warn('Tag found write', tag);
          // write ndef
            NfcManager.transceive(bytes)
            .then(() => console.log('write completed'))
            .catch(err => console.warn(err))`your text`

            // request ndef formating (first argument can be null in this case)
            NfcManager.transceive(null, {format: true})
            .then(() => console.log('format completed'))
            .catch(err => console.warn(err))
        } catch (ex) {`your text`
          console.warn('Oops in write!', ex);
        } finally {
          // stop the nfc scanning
          NfcManager.cancelTechnologyRequest();
        }
    }`
0

There are 0 answers