android浏览器的intent-filter怎么设置
怪我咯
怪我咯 2017-04-17 13:16:44
[Android讨论组]

手机检测到一个含有URL的NFC标签时,会提示选择一个浏览器来打开,下图。intent-filter应该怎么写,才会让系统提示中出现我自己写的程序呢,

下面这么写貌似没用,提示的只有浏览器,

<intent-filter >
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="http"></data>
    <data android:scheme="https"></data>
</intent-filter>

怪我咯
怪我咯

走同样的路,发现不同的人生

全部回复(1)
黄舟
    <intent-filter>
        <action android:name="android.nfc.action.NDEF_DISCOVERED"/>
        <category android:name="android.intent.category.DEFAULT"/>
       <data android:scheme="http"
                  android:host="developer.android.com"
                  android:pathPrefix="/index.html" />
    </intent-filter>

这是Android官方文档的实例,题主可以试试。

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号