On Sat, Jul 3, 2010 at 7:42 PM, Indicator Veritatis <[email protected]> wrote: > That may be true, but if so, there is a serious problem with the > online Android documentation. For as I have already shown, the > documentation clearly states that there is a possible transition > direct from the started state to the stopped state, one that does not > call onPause() first.
That would occur in fairly rare cases, when something occurs on the device after onStart() and before onResume(). Since those methods are invoked in rapid succession, something else taking over the screen (e.g., phone call comes in) during that window is rather unlikely. Developers should not be worrying about that particular scenario very much, if at all. > So other than your own authority, on what grounds do you say that the > docs are wrong? The docs are not wrong. However, my previous post was covering the 99.999% case, not every possible scenario. On Sat, Jul 3, 2010 at 7:50 PM, Indicator Veritatis <[email protected]> wrote: > This is certainly wrong. No, it is certainly correct. > Pressing the Back key does NOT cause > onDestroy() to be called. Yes, it does. > It causes onPause() to be called. And onStop(), and onDestroy(). > I have run > this in the emulator too many times myself to believe that it does. I even had to run my own test, just to confirm I hadn't slid into some parallel dimension, before writing my previous post. onDestroy() is called after the BACK button is pressed, just like it is supposed to. It has behaved this way for over two years. If you are unable to replicate this, there is a problem in your development environment. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Consulting: http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

