简体   繁体   English

NFC标签和NFC数据格式 - Android

[英]NFC tag and NFC data format-Android

I started studying android NFC ,I am Confused about NFC tag(i think it is hardware component,Am i correct) and NFC data Format 我开始研究Android NFC,我对NFC标签感到困惑(我认为它是硬件组件,我是正确的)和NFC数据格式

  1. Can any one list the types of NFC tags and NFC data Formats. 任何人都可以列出NFC标签和NFC数据格式的类型。
  2. If NDEF is data format,Where it is possible to write in all NFC tags. 如果NDEF是数据格式,则可以在所有NFC标签中写入。

I am confused about NDEF and Mifare whether they are tags or data Format. 我对NDEF和Mifare感到困惑,无论它们是标签还是数据格式。

Thanks. 谢谢。

There are 4 standard NFC tag types: Type 1, Type 2, Type 3, Type 4 They differ in how you access data on them, and on the communication frame work you use to talk to them. 有4种标准NFC标签类型:类型1,类型2,类型3,类型4它们在访问数据的方式和您用来与它们通信的通信框架工作方面有所不同。 (This gets into the mechanics of how data is exchanged) Mifare is a proprietary standard made by NXP Mifare Ultralite is a type 2 tag (这涉及到如何交换数据的机制)Mifare是恩智浦制造的专有标准Mifare Ultralite是一种2型标签

The tags differ in the maximum amount of data you can store on them, and the maximum amount of data that can be exchanged per command (Type 2 tags can read 16 bytes at a time, and can write 4 bytes at a time) 标签的不同之处在于您可以存储的最大数据量,以及每个命令可以交换的最大数据量(类型2标签一次可以读取16个字节,并且一次可以写入4个字节)

NDEF is a way of formatting data on the tags. NDEF是一种格式化标签数据的方法。 Mifare and the 4 tag types can all be formatted to store data in a NDEF format. Mifare和4种标签类型都可以格式化为以NDEF格式存储数据。

Android recognizes these tag types when you use the NDEF class for accessing and filtering tags it scans. 当您使用NDEF类访问和过滤其扫描的标记时,Android会识别这些标记类型。

Not all Nfc tags (even the standard ones and Mifare) will be set up for Ndef, or will hold Ndef formatted data. 并非所有Nfc标签(甚至是标准的和Mifare标签)都将设置为Ndef,或者将保存Ndef格式的数据。 But Android automates this process, so you don't have to worry about what type of tag you have, only if it can store Ndef data on it. 但Android会自动执行此过程,因此您不必担心您拥有的标记类型,只有它可以在其上存储Ndef数据。

Mifare, as a proprietary standard, is not guaranteed to have it's own class in Android, so you may have to write your own stack for accessing it on a phone. 作为专有标准,Mifare不保证在Android中拥有自己的类,因此您可能必须编写自己的堆栈才能在手机上访问它。 (Nexus S supports Mifare, and can write Ndef data to it, if you are wondering.) (Nexus S支持Mifare,如果你想知道的话可以写Ndef数据。)

I hope this helps. 我希望这有帮助。

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

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