NFC 标签是否必须采用 NDEF 格式?
NFC 标签是否必须采用 NDEF 格式才能使用标准 Android 应用程序或 PC 应用程序进行读/写?
Do NFC tags have to be NDEF formated to read/write using a standard android app or a PC app?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,标签不需要包含 NDEF 格式的数据。您可以使用任何您想要的格式。
NFC API 甚至提供了多种以本机格式读取和写入标签的方法。例如,以下是 Mifare Ultralight 标签的功能列表:
http:// developer.android.com/reference/android/nfc/tech/MifareUltralight.html
对于 NFC Api 未提供访问 API 的标签类型,您还可以使用收发方法。
请注意,如果您进入低级别,您会失去相当多的抽象。如果您使用 NDEF,NFC 子系统将为您抽象不同标签类型之间的差异。
No, the tags don't need to contain data in NDEF format. You can use any format that you want.
The NFC API even provides several methods to read and write to tags in the native format. Here for example is the list of functions for Mifare Ultralight tags:
http://developer.android.com/reference/android/nfc/tech/MifareUltralight.html
For those tag-types where no access API is provided by the NFC Api you can also directly send the commands to the tag using the transceive method.
Note that you loose quite a bit of abstraction if you go low-level. If you use NDEF the NFC-subsystem will abstract the differences between the different tag types for you.