2 NDEF mesages /在一个NFC标签的记录 - 机器人 [英] 2 NDEF mesages/records on one NFC tag - Android

查看:148
本文介绍了2 NDEF mesages /在一个NFC标签的记录 - 机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人试图如何Android的默认行为,当在NFC标签被保存2 NDEF记录,一个是指向与应用的apk的URL,而第二应用具有专有数据?

Does anybody tried how the Android default behavior, when on the NFC tag are saved 2 NDEF records, one is pointing to the URL with application .apk, while the 2nd has application proprietary data?

使用情况如下:当用户没有安装的应用程序尚未器件开始无论是谷歌播放或网页浏览器,用户可以下载应用程序。一旦用户安装了这个程序处理的标签内容。两者都是分开工作,但我还没有尝试过2 NDEF消息或2的记录在一个NDEF。任何以2 NDEF记录的经验?我可以尝试我自己,但我想,以节省时间。

The use case is following: When user has not an application installed yet the device starts either Google Play or the web browser and user can download the application. Once user installs the application it process the tag content. Both are working separately, but I have not tried 2 NDEF messages or 2 records in one NDEF. Any experiences with 2 NDEF records? I can try on my own, but I would like to save a time.

BR 切赫

推荐答案

二NDEF消息不被支持的Andr​​oid(大概也不会被其他平台)。在一个NDEF消息的多个NDEF记录工作正常。正如评论指出,一个Android应用程序记录(AAR)完美的作品。请记住,不要把它作为消息的第一条记录,并添加一个意图过滤器,该消息的第一条记录相匹配(否则你的应用程序将与正常LAUNCHER_MAIN推出,没有NDEF消息,而不是NDEF_DISCOVERED与NDEF消息。

Two NDEF messages is not supported by Android (and probably also not by other platforms). Multiple NDEF records in one NDEF message works fine. As noted in the comments, an Android Application Record (AAR) works perfectly. Just keep in mind not to put it as the first record of the message and add an intent filter that matches the first record of the message (otherwise your app will be launched with normal LAUNCHER_MAIN, without NDEF message, instead of NDEF_DISCOVERED with NDEF message.

指向Play商店应用程序的URL的作品通常是罚款,也一样,如果你有意向过滤器的应用程序本身的URL相结合。它的工作原理也是在Android 2.3。请记住,虽然,Play商店的应用程序和浏览器旁边的其他应用程序可能有一个相匹配的意图过滤器。你永远不会有这个问题与AAR(AAR,但只因为ICS支持)。

A URL pointing to the app in the Play Store works usually fine, too, if your combine it with an Intent filter for that URL in the app itself. It works also on Android 2.3. Keep in mind, though, that other apps beside the Play Store app and the browser may have a matching intent filter. You never have that problem with an AAR (but AAR is only supported since ICS).

这篇关于2 NDEF mesages /在一个NFC标签的记录 - 机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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