如何从共享菜单中排除您自己的应用程序? [英] How to exclude your own app from the Share menu?

查看:29
本文介绍了如何从共享菜单中排除您自己的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

该应用有一个意图过滤器,允许它通过 ACTION_SEND 意图出现在其他应用程序的共享菜单中.应用程序本身也有一个使用 ACTION_SEND 和 createChooser() 的共享菜单,我的应用程序出现在列表中.由于它们已经在我的应用程序中,让它们能够共享回自己似乎很奇怪.

The app has an intent filter to allow it to appear in the share menu in other applications via ACTION_SEND intents. The app itself also has a share menu using ACTION_SEND and createChooser(), and my app appears in the list. Since they are already in my app it seems strange to have them be able to share back to itself.

如果我的应用是从我的应用中调用的,有没有办法让我的应用不出现在列表中?

Is there a way for my app not to appear in the list if it's being called from my app?

推荐答案

如果我的应用是从我的应用中调用的,有没有办法让我的应用不出现在列表中?

Is there a way for my app not to appear in the list if it's being called from my app?

不是通过createChooser().不过,您可以通过 PackageManagerqueryIntentActivities() 创建自己的类似选择器的对话框,并通过这种方式过滤掉自己.

Not via createChooser(). You can create your own chooser-like dialog via PackageManager and queryIntentActivities() and filter yourself out that way, though.

这篇关于如何从共享菜单中排除您自己的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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