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
Post a Comment