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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

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

ios - I get the error Property '...' not found on object of type '...' -