gpt4 book ai didi

android - 我可以在调用 Intent.ACTION_VIEW 时禁用某个选项吗?

转载 作者:行者123 更新时间:2023-11-30 04:04:46 26 4
gpt4 key购买 nike

我正在做一个应用程序,我的 list 中有一个 Intent Filter,这个 Intent Filter 有 Action

<action android:name="android.intent.action.VIEW" />

和类别

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

并且,当我想启动一个包含在该 Intent 过滤器中声明的数据的网页时,我的应用程序会出现在对话框中,并带有浏览器。

这就是我想要的,但有些情况下,当我按下特定按钮时,我不想启动我的应用程序,但它出现在对话框中。

我可以禁用它吗?

附言。对不起我的英语。

最佳答案

Can I disable it?

只能通过创建您自己的选择器对话框,使用 PackageManager 和类似 queryIntentActivities() 的东西来找出可能性,将您自己从列表中过滤掉,然后构建一个对话框与结果。

关于android - 我可以在调用 Intent.ACTION_VIEW 时禁用某个选项吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11904158/

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