In android how to close entire application with logout button -


i have activity a, b & c , went a-> c-> b-> @ final activity have 1 logout button, , on click of it, how finish entire application previous activities , stacks.

try this,

intent intent = new intent(mainactivity.this, loginactivity.class) .setflags(intent.flag_activity_clear_top); finish(); intent.addflags(intent.flag_activity_new_task); intent.addflags(intent.flag_activity_clear_task); startactivity(intent); 

if have session, please clear session before intent have been called.


Comments

Popular posts from this blog

php - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

authentication - ASP.NET Core 1.0. Bearer Token, cannot access custom claims -