1
votes

I am using NXP NDEF tag and NFC Tag writer app given by NXP but in sony phone app show memory 524 byte but in MOTO mobile show as 52 byte memory. I am finding solution more than time but not resolved it. Please help me find out it.

I use the following code to read memory:

Ndef ndef = Ndef.get(tag);
int maxlength=ndef.getMaxSize();

For writing data I use

Ndef ndef = Ndef.get(tag);
NdefRecord mimeRecord = NdefRecord.createMime("text/plain", byteArray);
NdefMessage message = new NdefMessage(mimeRecord);
ndef.writeNdefMessage(message);
1

1 Answers

0
votes

int maxlength=ndef.getMaxSize(); Here, ndef.getMaxSize response depends on the Ndef object returned by the Android Middleware. Due to the changes in one android middleware to another, there is a possibility that it returns unexpected object with discrepancy in the values like maxSize. NXP provides a Open API library for Java and Android app development called "TapLinx" which is free to use. For better results you can use that. Hope the info helps. Cheers!