简体   繁体   English

从Android附加NFC标签

[英]NFC tag appending from Android

I would like to know how to append some text to an NFC tag on Android. 我想知道如何在Android的NFC标签上附加一些文本。 I know that writeNdefMessage can overwrite the the whole message on the tag but I did not find any method to append data to it. 我知道writeNdefMessage可以覆盖标记上的整个消息,但是我没有找到任何向其添加数据的方法。 However, I would prefer to append it. 但是,我希望将其附加。

If you want to stick to high-level (tag platform independent) access to NFC tags through the Ndef class, then you can only overwrite the whole NDEF message using writeNdefMessage() . 如果要通过Ndef类坚持对NFC标签的高级(独立于标签平台)访问,则只能使用writeNdefMessage()覆盖整个NDEF消息。

Android also permits you to directly send low-level commands to NFC tags (eg to issue a read/write command). Android还允许您直接将低级命令发送到NFC标签(例如,发出读/写命令)。 You could use such commands to append data to a free memory area on the tag. 您可以使用此类命令将数据附加到标签上的可用存储区。 However, how you would do this heavily depends to the tag platform that you use. 但是,如何执行此操作很大程度上取决于您使用的标签平台。

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

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