android - stop current activity and pass other activity -
i want stop or kill current activity , pass activity.i tried below code doesn't stop current activity
if (newmessage.equals("0")) { intent send_push = new intent(getapplicationcontext(), login.class); // send_push.addflags(intent.flag_activity_clear_top); // send_push.setflags(intent.flag_activity_clear_top); startactivity(send_push); }
you should this:
send_push = new intent(splashactivity.this, login.class).setflags(intent.flag_activity_clear_task | intent.flag_activity_new_task); startactivity(send_push);
the flags need used togther.
android
No comments:
Post a Comment