On Wed, Nov 9, 2011 at 5:32 AM, RLScott <fixthatpi...@yahoo.com> wrote: > The app may be put into background when you press the home button, but > the activity itself is always destroyed.
No. An activity is immediately destroyed for a BACK press, or a finish() call, but not HOME. > So onCreate will be called > every time it becomes visible. If you want to preserve some content > in your app, then don't store that content as part of the activity > class. Store it in a global. Then in your onCreate you can check > that global to see if it is null. Load it from the Internet only if > that global is null. The OP's process is going away, if the reported behavior is accurate. Android has determined that it is short on memory, and the OP's process came up as a likely candidate to terminate. In this case, global variables and such will not help, as they too will evaporate when the process is terminated. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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