android - Activity in stack -
ointent.setflags(intent.flag_activity_clear_top | intent.flag_activity_clear_task | intent.flag_activity_new_task|intent.flag_activity_no_user_action); //ointent.setflags(intent.flag_activity_no_history|intent.flag_activity_no_user_action); ointent.putextra("exit", true); startactivity(ointent); finish();
i have use following set of code clear activiites...it works fine...in scenario...the blank activity started...i think because of starting new task in flag...i dont want empty activity/...how solve this?
api 21++
activitymanager =(activitymanager) this.getsystemservice(activity_service); list<apptask> ap = am.getapptasks(); ap.get(0).finishandremovetask();
api 21--
from sir @david wasser pointed, use , mantain putextra code , in oncreate of target activity
check if has key of exit , call finish()
immediately
Comments
Post a Comment