Umesh

Untitled Document

Friday, 22 March 2013

Finishes all the intents in stack which are on the top of any other activity


Let suppose if you want to log-out from last activity and come on to front activity. It removes all intents from stack which are on the top of front activity. It's nice search for me.This is the nice code. It finishes all the activities which are on the top of MagicMap--By Umesh


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

No comments:

Post a Comment