I have an application that contains several activities - call them A, B, C and D. Normally the user will launch activity A, then go to activity B, then C, then D. All activities have launchMode = "standard" so that if the user switch to another app or return to home screen, he can go back to where he left off by pressing the application icon on launcher or home screen.
Most of the time the application works fine, but if the user start the app from somewhere other than the launcher / home screen (e.g. upgrading the app Android Market then press "Open"), the launch behavior becomes very strange. Now if the user return to the home screen, then press the application icon again, it will start a new instance of activity A and put it on top of the stack. If the user continue to navigate the app, the activity stack will become something like A -> B -> C -> A -> B. I have verified this by running "adb shell dumpsys activity". This behavior will persist until the application completely exits (i.e. no more activities in the stack), until then the activities will keep accumulating in the stack. As the activities are quite graphic intensive, the application will run out of memory when there are ~15 levels of activities. So... is there a way to prevent this behavior? I want the launcher icon always get back to the activity where the user left off, or start the default activity if the application wasn't running. I have tried the various launch modes but seems none of them fits this description. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en