Android:如何使NFC标签仅对用户可用并且对我来说可写? [英] Android: How to make a NFC Tag Ready only for users and writable for me?

查看:196
本文介绍了Android:如何使NFC标签仅对用户可用并且对我来说可写?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个设计个性化标签的应用程序,当Android手机检测到该标签时,它会启动另一个包含某些内容的应用程序.一切正常,我知道如何制作一个只读的nfc标签.问题是,我想让NFC标签仅可由其他应用程序的用户读取.但是我也希望,如有必要,可以修改这些标签以进行重写.但是我想防止用户自己去做. 这就是为什么ndef.makeReadOnly()不适合我的原因.

I have an app that design personalized tags that, when it is detected by an android phone, launches another app with some content. It all works fine and I know how to make a read only nfc Tag. The problem is, I would like to make a NFC Tag only readable by users of the other app. But I also want , if necessary, modify these tags in order to be rewritten. But I want to prevent from users to do themselves. that's why a ndef.makeReadOnly() is not appropriate for me..

有人可以帮助我吗?

推荐答案

在某种程度上取决于您将使用的确切标签. Android存储的用于存储NDEF消息的标准NFC论坛标记类型没有为此定义的特定功能.因此,Android API也不提供它.只有makeReadOnly(),在大多数情况下,该标记使标签不可逆地变为只读状态.

It depends somewhat on the exact tags you will be using. The standard NFC Forum tag types for storing NDEF messages that Android supports have no specific functionality defined for this. So the Android API does not provide it either. There is only makeReadOnly(), which in most cases makes the tag irreversibly read-only.

但是,当您查看实际实现所需NFC功能的标签内的芯片时,它们通常会提供更多功能.这些额外的功能可能包括用于写入的访问控制,从而可以根据需要配置芯片.

However, when you look at the chips inside the tags that actually implement the required NFC functionality, they often provide more functions. These extra functions may include access control for writing, allowing the chip to be configured like you want.

一些示例(我最熟悉的都是NXP制造的):

Some examples (all manufactured by NXP, as I am most familiar with those):

  1. MIFARE Classic:存储区由2个密钥保护.可以将一个键配置为只读,而将另一个键用于写入内存.注意:并非所有的Android设备都可以访问这些设备!
  2. MIFARE Ultralight C:可以提供额外的密码保护以防止覆盖
  3. MIFARE DESFire:可以配置多个身份验证密钥和访问权限,包括不带密钥的只读访问
  4. ICODE SLI(X)-S:可以提供额外的密码保护以防止覆盖

大多数这些标签通常都可以在线销售.不过,您将不得不在Internet上寻找一些信息,以收集有关如何完成配置的所有信息.大多数情况下都可以使用PC软件.

Most of these tags are generally available for sale on-line. You will have to hunt a bit on the internet to gather all the information on how the configuration has to be done, though. There is PC software available in most cases.

这篇关于Android:如何使NFC标签仅对用户可用并且对我来说可写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆