Something else is causing your Force Close. Read the exception report in LogCat and dig into the actual cause.
Read up on the Activity lifecycle, in particular the bubble that reads "Other applications need memory": http://developer.android.com/reference/android/app/Activity.html The Android OS won't even try to return to your app if it reaped it for memory. It will just restart it. There is no way that it reaps some part of the app state irretrievably, but leaves the process going. If the system is low on memory, your app may receive an *opportunity* to shed some of its state data at the app's discretion. If your app does honor this *request*, then the system may have regained enough memory to allow the user to run some other heavy task in the foreground. The current activity also got an earlier courtesy notice when your activity was no longer active, giving an opportunity to save the state away. If your app does not honor these requests, or cannot free up enough memory, the then the system reserves the right to completely kill the whole process as a whole. If that happens, your next startup will surely be as a brand new process, and your activity will be handed whatever you chose to save away earlier. You *can* flag your app to "start at the initial activity" every time the app is suspended and resumed, but that is completely separate from your impression that Android frees up memory without any notice or control over its own state. On Feb 1, 7:18 pm, Scott Deutsch <[email protected]> wrote: > Hello Group, > > How can I deal with when the user hits the home button when in my app and > then doesnt go back to it for a while and then they hold home button to go > back to my app and then the force close appears since all the memory has > been freed because how the OS is designed. > > Is there a way instead of resuming the app that has freed memory and will > break instantly...just launch it brand new? > > Is there a setting in the Android Manifest to force start brand new if freed > memory? > > Thanks group. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

