It is easy to test: First make sure to run some other app on your device/emulator.
Run your app on your device or emulator and navigate to your activity. Then start another app: Either through the most-recent app list or by clicking some item in your notification list (if any). While this other app is in the foreground, use DDMS to kill your application's process. Then hit the back button/key. This will exit the other app. You may wind up on the home screen. If so, restart your app (use most recent app list). Or you wind up directly in your app. Either way, your app's process and activity is restarted with the proper Bundle (saved instance state). Hit the back button a few times in case your activity was not on the bottom of your app's task. This will test your other activities as well. As MagouyaWare stated earlier, use onSaveInstanceState(...) to save your own activity's state and use onRestoreInstanceState(...) or onCreate's Bundle parameter (if it is not null) to restore the state you saved in onSaveInstanceState earlier. Note that most of the state persistence is already handled by the Android framework. Only if you have specific (user) state that the Android framework can't know about, use your own instance-state saving/restoring. On Sunday, June 3, 2012 7:02:28 AM UTC-4, Blue Wanderer wrote: > > As it is said in the Dev Guide Activities could be *restored* after > "the App process is killed" and "User navigates to the Activity". > First of all, I have never seen this happened. It doesn't seem that I > can "navigates back" to an Activity when its process is killed, the > Activity is simply gone from the Activity stack after the process is > gone. > > If such thing is to happen, how exactly it will happen? > > And I saw a weird but good thing is that: > There is one Activity A1 which starts Activity A2 of another App. Now > A2 is the foreground activity. When memory gets low, at least on > emulators(where I can easily eat up the RAM), A2 will be killed > instead of A1. > > I will make cry if I have to restore all the relationships between the > Activities risen from the dust. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

