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 ?
So, with respect to time, setContentView alone is faster, since it doesn't start a new activity. Hence, your app will show the new screen faster... On the other hand, if you call startActivity, this activity is put on the stack, so you can go back by pressing the back button.
The easiest way to do this would be to pass the session id to the signout activity in the Intent you're using to start the activity: Intent intent = new Intent(getBaseContext(), SignoutActivity. class); intent. putExtra("EXTRA_SESSION_ID", sessionId); startActivity(intent);
startActivity() is asynchronous. The other activity will not show up until sometime later, particularly after you return from whatever callback you were in when you called startActivity() (e.g., onClick() of some View.
Not directly, AFAIK. However, you could create your own chooser using PackageManager
and queryIntentActivityOptions()
, which does allow for filtering yourself (or other things) out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With