Re: [android-developers] Application Recycling

2012-03-19 Thread Justin Anderson
> > If in activity 1 I initialize a static field to a value. Then lock the > device on activity 5, I then return to my application 4 hours later, during > which time the device reclaimed my application for memory. I then restore > my app and am looking at activity 5, I then tap something and naviga

Re: [android-developers] Application Recycling

2012-03-18 Thread Trey
Thank you all for your replies. I have tested each of my activities and their state saving using the rotate approach. But what I'm trying to test is the state of my entire application, not my activities. For example: If in activity 1 I initialize a static field to a value. Then lock the device

Re: [android-developers] Application Recycling

2012-03-16 Thread TreKing
On Wed, Mar 14, 2012 at 10:51 AM, Trey wrote: > I'm trying to test my application's ability to be restored after my phone > reclaims it for memory. I'm unable to find a consistent way to reproduce > this behavior. > Rotate your device. ---

Re: [android-developers] Application Recycling

2012-03-16 Thread Justin Anderson
There isn't really a term for this... But, all you need to do is implement the following methods and save/restore whatever data you need to be able to restore your activity to its last known state: http://developer.android.com/reference/android/app/Activity.html#onSaveInstanceState%28android.os.B

[android-developers] Application Recycling

2012-03-16 Thread Trey
I'm trying to test my application's ability to be restored after my phone reclaims it for memory. I'm unable to find a consistent way to reproduce this behavior. My first questions is: What is the official term for this? "Application Recycling" doesn't seem to help me find any information online.