On Wed, Jan 4, 2012 at 7:58 AM, saex <[email protected]> wrote: > I have an activity non visible, with some variables that must be > accesed by static way. This activity can't be a service, because it is > a MapView activity. > > I need to access some static varibales of the activity anytime. I know > that the SO can close suspended activities (non visible activities) > so.... how can i avoid it? i need that my suspended non visible > activitity never get's deleted by the SO.
Fortunately, what you want is impossible. Nothing lives forever. Android -- at the specific request of a user or on its own accord -- can terminate any process it so desires. You are welcome to use static data members as a cache, but you must persist data to files if you want to ensure it survives Android terminating your process. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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

