stack - Android: Clear Activity History -
i've faced 1 problem - clearing activity history. have following consequence problem appears:
a(splashscreen)->b(guestscreen)->c(screen signed users)->press home button->a->b->press button->c->press button->b->press button->exit app.
i tried different ways solve , found 1 quite strange solution throughout setting activities singleinstance , setting intent flags clear_top , new_task
activities presenting strange(not normally, mean, firstly, there appears empty black screen actionbar , after ~1 second appears real layout) , bit delay said. didn't solution in spite of closes correctly , in correct consequences. now, i'm trying work without delay , strange black screen on moment. tried play intent flags clear_task, clear_top
too. tried use cleartaskonlaunh root activity , finishonlaunch in manifest file
others it`s necessary, doesn't help. how fix it?
edit:
trying set cleartaskonlaunch again. see next log when start app first time(a has called b without flags):
main stack: taskrecord{42610648 #869 } intent { flg=0x10000000 cmp=/.activities.splashactivity } hist #4: activityrecord{413cf8f8 /.activities.guestactivity} intent { cmp=/.activities.guestactivity } processrecord{414fdf60 15651:/10103}
// guest activity(b) calls useractivity(c):
intent { flg=0x10000000 cmp=/.activities.splashactivity } hist #3: activityrecord{415c86f0 /.activities.useractivity} intent { cmp=/.activities.useractivity } processrecord{414fdf60 15651:/10103}
//press home button , launch app again(a has called b):
taskrecord{42610648 #869 cashongo.app.peachy} intent { flg=0x10000000 cmp=c/.activities.splashactivity } hist #5: activityrecord{42127398/.activities.guestactivity} intent { cmp=/.activities.guestactivity } processrecord{414fdf60 15651:/10103} hist #4: activityrecord{415c86f0 /.activities.useractivity} intent { cmp=/.activities.useractivity } processrecord{414fdf60 15651:/10103}
the same problem again, last activity in history. if press button i`ll useractivity.
i didn't understand question 100%
i think facing problem activity stack , clear_top
so use startactivityforresult instead of startactivity
Comments
Post a Comment