简体   繁体   中英

NXP NFC NDEF Tag memory size issue

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);

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM