Exclude an activity from back-stack history

suggest change

Let there be Activity B that can be opened, and can further start more Activities. But, user should not encounter it when navigating back in task activities.

The simplest solution is to set the attribute noHistory to true for that <activity> tag in AndroidManifest.xml:


This same behavior is also possible from code if B calls finish() before starting the next activity:

startActivity(new Intent(context, C.class));

Typical usage of noHistory flag is with “Splash Screen” or Login Activities.

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents