android - Home button and back to app in a newly installed app loads the initial activity again -
i'm encountering following scenario in application:
- installing , opening (using open button after installation, instead of icon in applications list).
- navigating through few activities.
- clicking home button.
- clicking application icon load again.
- instead of returning activity in, initial activity loaded. previous activity still there , can accessed clicking button, there isn't way know , looks app restarted.
this may issue in app, because in cases might require registration after performing few actions, , losing focus on activity annoying
is there can done avoid that?
there's couple of flags under intent might helpful. use them when activity launched:
"flag_activity_task_on_home: if set in intent passed context.startactivity(), flag cause newly launching task placed on top of current home activity task (if there one).
flag_activity_reorder_to_front: if set in intent passed context.startactivity(), flag cause launched activity brought front of task's history stack if running."
http://developer.android.com/reference/android/content/intent.html
Comments
Post a Comment