My app works with pictures. It can take multiple pictures as an input, process them, and send them again to another app.
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)
.
Is there a way to exclude my own activity from the list of apps that is displayed to the user after the startActivity()
call ?
What you need to do is:
Query the available apps to handle the intent.
startActivity()
).Here's a blog post explaining it in a bit greater detail.
Or copy-paste the code directly:
Not directly, AFAIK. However, you could create your own chooser using
PackageManager
andqueryIntentActivityOptions()
, which does allow for filtering yourself (or other things) out.