gpt4 book ai didi

android - 如何在android的默认浏览器选择列表中添加我的浏览器?

转载 作者:行者123 更新时间:2023-11-29 18:17:22 25 4
gpt4 key购买 nike

我有一个名为“TextOnly”的应用程序..如何添加到列表中以选择默认浏览器?

最佳答案

在 android list 文件中指定您的 Intent ,例如:

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

确保:

<uses-permission android:name="android.permission.INTERNET"></uses-permission>

也在里面。

reference :

Similarly, if the action is ACTION_VIEW and the data field is an http: URI, the receiving activity would be called upon to download and display whatever data the URI refers to.

关于android - 如何在android的默认浏览器选择列表中添加我的浏览器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7394369/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com