Close All Previous Activities From the Current Activity in Android

by Sasikumar 2014-03-03 10:09:02

To close all previous activities from the current activity use the following code,
Intent intent = new Intent(getApplicationContext(), Home.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
By setting "FLAG_ACTIVITY_CLEAR_TOP" flag all activities prior to the "Home" activity will be closed.
898
like
0
dislike
0
mail
flag

You must LOGIN to add comments