Sunday, March 18, 2012

Re: [android-developers] Application Recycling

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 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 navigate to activity 6, once there the activity attempts to access the field initialized in activity 1, but since activity 1 hasn't ran since the application was restored I get a null reference exception.

I realize this is a bad technique--and I want to be able to recreate application recycling in order to diagnose a similar issue, so that I may resolve it, but am unable to. Any ideas on how I can for application recycling, so that I can test this without having to wait 4 hours in between each test?

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate