Android: bug in launchMode="singleTask"? -> activity stack not preserved

Posted by Stefan Klumpp on Stack Overflow See other posts from Stack Overflow or by Stefan Klumpp
Published on 2010-03-10T14:12:35Z Indexed on 2010/06/07 6:02 UTC
Read the original article Hit count: 821

Filed under:
|

My main activity A has as set android:launchMode="singleTask" in the manifest. Now, whenever I start another activity from there, e.g. B and press the HOME BUTTON on the phone to return to the home screen and then again go back to my app, either via pressing the app's button or pressing the HOME BUTTONlong to show my most recent apps it doesn't preserve my activity stack and returns straight to A instead of the expected activity B.

Here the two behaviors:

Expected: A > B > HOME > B
Actual: A > B > HOME > A (bad!)

Is there a setting I'm missing or is this a bug? If the latter, is there a workaround for this until the bug is fixed?

FYI: This question has already been discussed here. However, it doesn't seem that there is any real solution to this, yet.

© Stack Overflow or respective owner

Related posts about android

Related posts about activity-stack