Confusion over the Android Activity Lifecycle
I have an app which is one activity. Everything works as I would expect except when I put the phone (a Samsung Galaxy Ace running Gingerbread) to sleep with the button on the side. When I do this, the following are called (in this order): onPause, onStop, onDestroy, onCreate, onStart, onResume, onPause . This is without waking the phone up , it is still asleep - screen is off. Why is the activity killed completely and re-recreated? Even more bizarre, if the phone is then switched back on the following happens: onResume, onPause, onStop, onDestroyed, onCreate, onStart, onResume Even though it's