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 - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -