1

I created a function under which I am calling this code : -

this.nfc.readerMode(this.flags).subscribe((tag) => {
this.sucessMessage = tag;
his.scanSuccessfully('Scanned successfully.');
}, (error) => this.errorMessageNFC(error));
 

When NFC tag is scanned I only got this response : -

{
  id : [4, 96, 117, 74, -17, 34, -128],
  techTypes : ["android.nfc.tech.IsoDep", "android.nfc.tech.NfcA", "android.nfc.tech.Ndef"]
},

Where as it need to give me response like

{
    "isWritable": true,
    "id": [4, 96, 117, 74, -17, 34, -128],
    "techTypes": ["android.nfc.tech.IsoDep", "android.nfc.tech.NfcA", "android.nfc.tech.Ndef"],
    "type": "NFC Forum Type 4",
    "canMakeReadOnly": false,
    "maxSize": 2046,
    "ndefMessage": [{
        "id": [],
        "type": [116, 101, 120, 116, 47, 112, 103],
        "payload": [72, 101, 108, 108, 111, 32, 80, 104, 111, 110, 101, 71, 97, 112],
        "tnf": 2
    }]
}

I am using 'phonegap-nfc-npm' plugin.

  • The code of the plugin looks all correct for reading tags with `enableReaderMode`, this leaves one possible scenario that would generate what you are seeing. this is the Tag is empty (It's Ndef formatted but has no Ndef message on it). I suggest that you use a thirdparty app like NXP's TagInfo app to check the contents of the card, to check it actually has an Ndef message on it. – Andrew Nov 15 '20 at 11:06
  • 1
    Hi, did you managed to solve this? can please share the solution? Thanks – dan Dec 28 '20 at 01:30
  • Hi, any update on this? if i read the chip with other apps i can get the payload, but with the plugin i can olny get "id", and "techTypes" like the question posted. – Mariano Montañez Ureta May 20 '22 at 22:44

0 Answers0