I am trying to read from a Bloodsugar Meter using NFC, right now on an Android, haven't tried iOS yet (don't have a phone with NFC).
I am using react-native-nfc-manager as library and the example that comes with it: https://github.com/whitedogg13/react-native-nfc-manager
I am receiving this tag:
{ "techTypes":["android.nfc.tech.NfcV","android.nfc.tech.NdefFormatable"], "id":"87C5280D002602E0"}
I can see that NfcV is covered in this library, but how do I read it as that type?
I am following the example so I haven't set anything in my manifest or my build.gradle. I have linked it and it is working, but im missing the last part it seems.
By following the example it looks like I am supposed to use a method like this:
_parseText = (tag) => {
try {
if (Ndef.isType(tag.ndefMessage[0], Ndef.TNF_WELL_KNOWN, Ndef.RTD_TEXT)) {
return Ndef.text.decodePayload(tag.ndefMessage[0].payload);
}
} catch (e) {
console.log(e);
}
return null;
}
But my tag doesn't have a ndefMessage[0].