简体   繁体   中英

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,

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

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