简体   繁体   English

写完后如何锁定NFC标签?

[英]How to lock NFC tag after writing on it?

I am using NFC tags to write a student ID on it then to be read by my application, 我正在使用NFC标签在上面写上学生证,然后由我的应用读取,

How I can prevent any user to rewrite over the tag ? 如何防止任何用户重写标记?

This is how I did it when I tried, but this is not reversible, you can only do it once, so be careful. 这是我尝试时的操作方式,但这不是可逆的,您只能执行一次,因此请小心。

Ndef ndef = Ndef.get(tag);  
    if (ndef != null) { 
        ndef.makeReadOnly();
    }

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

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