【问题标题】:Android beam intent filterAndroid 光束意图过滤器
【发布时间】:2013-07-22 23:27:12
【问题描述】:

我正在创建一个应用程序来捕捉 android 光束并启动我的应用程序而不是指定的应用程序。例如:发送网页,但我的应用启动了。

我尝试使用 NDEF 意图过滤器设置清单,但它似乎没有捕捉到光束并启动我的活动。

        <intent-filter>
            <action android:name="android.nfc.action.NDEF_DISCOVERED" />
        </intent-filter>

感谢任何帮助。谢谢!

【问题讨论】:

    标签: android nfc intentfilter ndef android-beam


    【解决方案1】:

    在动作下方放置:

       <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="http"
            android:host="example.com"
            android:pathPrefix="" />
    

    欲了解更多信息:http://developer.android.com/guide/topics/connectivity/nfc/nfc.html#well-known-uri

    【讨论】:

    • 作为后续,我们能否在 data 属性中将 uri 指定为 mimetype?
    • 怀疑它也能正常工作,我还没有测试过,但如果可以的话,你会使用类似的东西:
    猜你喜欢
    • 2015-05-14
    • 1970-01-01
    • 2012-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多