documentation flaw? was android changed to no longer do that? i remember a 
presentation done by google mentioning this exact process as part of 
android's normal work... but that was years ago... can you point us to 
documentation stating otherwise?


regarding onStop and onDestroy, under some conditions they are not called, 
but yeah.. what they wrote is just wrong.


On Saturday, December 22, 2012 9:06:45 PM UTC+2, Mark Murphy (a Commons 
Guy) wrote:
>
> On Sat, Dec 22, 2012 at 1:59 PM, Jonathan S <xfsu...@gmail.com<javascript:>> 
> wrote: 
> > onDestroy - The final call you receive before your activity is 
> destroyed. 
> > This can happen either because the activity is finishing (someone called 
> > finish() on it, or because the system is temporarily destroying this 
> > instance of the activity to save space. You can distinguish between 
> these 
> > two scenarios with the isFinishing() method. 
>
> That is a documentation flaw. Android does not "destroy this instance 
> of the activity to save space", except by terminating the entire 
> process. isFinishing() will distinguish multiple reasons for onPause() 
> and onStop() being called (e.g., BACK will cause isFinishing() to 
> return true, HOME will cause isFinishing() to return false). 
>
> > finish() will call onDestroy() but not onStop() 
>
> False. What lifecycle methods will be called on an activity when 
> finish() is called depends on the state of the activity at that time. 
> If the activity has not yet been paused, onPause() will be called. If 
> the activity has not yet been stopped, onStop() will be called. Then, 
> onDestroy() will be called. 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> _The Busy Coder's Guide to Android Development_ Version 4.4 Available! 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to