写作NFC标签多种数据类型在一个水龙头 [英] Writing multiple data types in NFC tags in a single tap

查看:120
本文介绍了写作NFC标签多种数据类型在一个水龙头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能写入多个数据类型(如两个URL或者一个网址和一个文本)为从一个Android的NFC标签中的一个水龙头?

Is it possible to write more than one data type (like two urls or one url and one text) into a NFC tag from Android in a single tap?

推荐答案

可以,但是当你扫描一个标签,它只能有一个Android使用,以确定它是什么类型的标签的一种数据类型。这种数据类型是由您的NDEF消息的第一个NDEF记录来确定。 Android的分配MIME类型或URI这个记录,以便可以找出哪些应用程序是最好的开始处理标签。所以,如果你写一个文字记录和URI在标签上,Android将认为这是一个纯文本的标签,如果该记录是第一个,或一个URI标签,如果该记录是第一次。你仍然可以读取所有数据正常不过。

You can, but when you scan a tag, it can only have one data type that Android uses to determine what type of tag it is. This data type is determined by the first NDEF record in your NDEF message. Android assigns a MIME type or URI to this record so it can figure out which application is best to start to handle the tag. So, if you write a text record and URI on a tag, Android will think it is a plain text tag if that record is first, or a URI tag if that record is first. You can still read all the data as normal though.

这篇关于写作NFC标签多种数据类型在一个水龙头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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