I am new to Android and am having problems with savedInstanceState and lifecycle management.
http://developer.android.com/guide/topics/fundamentals/activities.html#Lifecycle I read an article on the life cycle, but I really don't know WHEN the process is killed and my good saveInstanceSate will be used! I can press "HOME", but it only starts "onPause" and then "onResume". I think so.
If I go to Menu-> Settings-> Application-> Manage Application-> My application name-> Force Stop, it is still regarded as a running application, but when I restart it, I return to "first Events". So it’s like closing the application, it’s not a “Killing process”, as I would like if I understand well.
So here are my questions:
1) How can I be sure that my process was killed (so my application will use saveIntanceState when it restarts)?
2) How can I get a process to be killed to check if my savedInstanceState file is well programmed?
3) When after the “killed” application restarts and “onCreate” is called (with the saved value InstanceState! = Null), can I access the additional information that I gave when I called Activity or intent information was deleted when the process was killed? Speaking differently, should I include in my saveInstanceState a copy of what was saved in Intent Extra?
Hope I'm clear enough;)
source share