如何从Activity.startActivity(意向)选配排除我自己的活动? [英] How to exclude my own Activity from Activity.startActivity(Intent) chooser?

查看:186
本文介绍了如何从Activity.startActivity(意向)选配排除我自己的活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序的工作原理与图片。它可以把多张照片作为输入,对其进行处理,并重新发送到另一个应用程序。

My app works with pictures. It can take multiple pictures as an input, process them, and send them again to another app.

因此​​,我的主要活动已宣布对 ACTION_SEND_MULTIPLE 的意图过滤器图片/ * MIME类型,并可能导致在执行新的意图用相同的操作和数据类型使用 Activity.startActivity(意图)

As a consequence, my main Activity has declared an intent filter on ACTION_SEND_MULTIPLE for image/* mimetypes and can result in issuing a new Intent with the same action and data type using Activity.startActivity(Intent).

有没有办法排除从被后显示给用户的应用程序的列表中,我自己的活动 startActivity()打电话?

Is there a way to exclude my own activity from the list of apps that is displayed to the user after the startActivity() call ?

推荐答案

不是直接的,AFAIK。但是,您可以通过创建自己的选择器 PackageManager queryIntentActivityOptions(),这确实允许过滤自己(或其他事情)了。

Not directly, AFAIK. However, you could create your own chooser using PackageManager and queryIntentActivityOptions(), which does allow for filtering yourself (or other things) out.

这篇关于如何从Activity.startActivity(意向)选配排除我自己的活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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