Sunday, April 28, 2013

How to finish all the activities in android application stack?

Android maintains activity stack for all the activities running on android device. If you want to perform logout like functionality, or want to finish all the activity of your application write the following statements, 

Intent intent = new Intent(getApplicationContext(), Home.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);



No comments:

Post a Comment