How to Clear or Kill Stack of Activity – Android

Posted on .

When we use to navigate from one Activity to another than the previous values resides in our device stack so Here is  some Tips to clear  or kill it ..


For API level 11 or greater, use FLAG_ACTIVITY_CLEAR_TASK and FLAG_ACTIVITY_NEW_TASK flag on Intent to clear or kill all the activity stack.



Simply use  android:noHistory=”true” in AndroidManifest.xml file .



  • Rohit Kashiwal

    Java part working perfectly but XML is not y ?

    • Sorry but Code is correct , Try and clean with your project.