[android-developers] How to tell if we were force killed for memory, in onCreate()?

2009-11-23 Thread Mark Wyszomierski
Hi, If I follow the lifecycle docs correctly, an Activity won't get notified if it's force killed for memory? Example: In my app, I create a maps driving intent. I can see in the log output say something like: I/ActivityManager( 76): Low Memory: No more background processes When the user

Re: [android-developers] How to tell if we were force killed for memory, in onCreate()?

2009-11-23 Thread Mark Murphy
Mark Wyszomierski wrote: If I follow the lifecycle docs correctly, an Activity won't get notified if it's force killed for memory? Correct. In a true force kill scenario, Android needs RAM quickly and cannot rely upon you to do something quickly. But was does onDestroy() get called, so we

Re: [android-developers] How to tell if we were force killed for memory, in onCreate()?

2009-11-23 Thread Dianne Hackborn
No a kill for memory definitely does not remove activities from the stack. That is the whole reason for onSaveInstanceState et al to exist -- so when the user returns to the activity, and it needs to be recreated because its process had been killed, that it can properly restore itself to its