>From the Activity documentation: http://developer.android.com/guide/topics/fundamentals/activities.html
If an activity is **paused or stopped**, the system can drop it from memory either by asking it to finish (calling its finish() method), or simply killing its process. When the activity is opened again (after being finished or killed), it must be created all over. On Apr 27, 5:55 pm, Eric <e...@alum.mit.edu> wrote: > On Apr 27, 4:45 pm, Mark Murphy <mmur...@commonsware.com> wrote: > > > On Wed, Apr 27, 2011 at 4:22 PM, Eric <e...@alum.mit.edu> wrote: > > > You then navigate to a new activity by starting it. > > > Which triggers onPause() and onStop() on the original activity. > > This is where I disagree with you. Android is allowed to 'clean up' > your activity right after onPause(), without killing the app, if it > wants to reclaim memory. The Activity lifecycle documentation says > the Activity is 'killable' after onPause(), which technically doesn't > mean the process must be 'killed'. It means the activity can be > destroyed after onPause() by the system calling 'finish()' on it. It > seems to me, in that specific case, if you've started another activity > from the current activity, and right after your onPause() was called, > Android decides 'finish' your activity due to memory constraints, I > don't see anything in the documentation that says Android can't > 'finish' your activity right there on the stop, thereby bypassing the > call to onStop(), and going directly into onDestroy(). In this case, > the process would still be running, your activity would be "paused", > archived, and 'destroyed', but never 'stopped'. You say 'onStop()' > will _definitely_ be called. I don't see that in the documentation I > read. -- 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