简体   繁体   English

NXP NFC NDEF 标签内存大小问题

[英]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.我正在使用 NXP 提供的 NXP NDEF 标签和 NFC 标签编写器应用程序,但在索尼手机应用程序中显示内存为 524 字节,但在 MOTO 手机中显示为 52 字节内存。 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(); int maxlength=ndef.getMaxSize(); Here, ndef.getMaxSize response depends on the Ndef object returned by the Android Middleware.这里,ndef.getMaxSize 响应取决于 Android 中间件返回的 Ndef 对象。 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.由于一个 android 中间件到另一个中间件的变化,它有可能返回意外的对象,其中的值存在差异,例如 maxSize。 NXP provides a Open API library for Java and Android app development called "TapLinx" which is free to use.恩智浦为 Java 和 Android 应用程序开发提供了一个名为“TapLinx”的开放 API 库,可以免费使用。 For better results you can use that.为了获得更好的结果,您可以使用它。 Hope the info helps.希望信息有所帮助。 Cheers!干杯!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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