On May 14, 2:54 am, Alok Kulkarni <[email protected]> wrote:
> I need to save many objects so basically onSavedInstanceState is not of full
> use .

Like in your case, I have apps that need to keep (hundreds of) objects
and state variables that require retention regardless of what's going
on at the UI level. What I've done in order to pick up where I left
off after a rotation change (or, for that matter, when the user calls
the app from the main screen) is to start and bind a Service that I
bind again when the app comes out at the other end. Implement getters
and setters like you normally would to access the relevant data. The
SDK contains a pretty good example how to do all that which you can
use as a blueprint.
The downside is that there's a risk the service gets killed as the
system is scraping for resources, but personally I haven't seen this
happen for a service that's bound to an UI thread. There's people on
the list who know much more about what's going on under the hood in
that regard, perhaps they can chime in.

-- 
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

Reply via email to