java - Clearning Stack of Activities unto the Top -


i want perform logout function in want clear activities before logout , start new login activity

here code

utilities.logoutplayerdefaults(profile.this); utilities.vibrate(profile.this); intent myintent = new intent (profile.this,fblogin.class); myintent.addflags(intent.flag_activity_clear_top); startactivity(myintent); 

but doesn't work. if press button go profile

try following way,

@override public void onbackpressed()  {    intent myintent = new intent (profile.this,fblogin.class);    myintent.addflags(intent.flag_activity_clear_top);    myintent.addflags(intent.flag_activity_clear_task);    myintent.addflags(intent.flag_activity_new_task);    startactivity(myintent);    super.onbackpressed(); } 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -