Hmm. I'm going to feel stupid if this is the problem: I'm reinstantiating
the preferences object and its editor every time I load them and save/commit
them (i.e. within the onResume and onPause methods). Is that not a good idea
(aside from efficiency.. I mean in terms of the prefs being persistent)?

On Fri, Jan 23, 2009 at 8:59 AM, android_soft <cspeche...@gmail.com> wrote:

>
> Well ,not sure if this will help, since there's no code snippet....but
> here goes....
>
> 1. You can hold on to the SharedPreferences.Editor object...
> 2. edit as much as you want
> 3. In OnPause(), go ahead and commit the editor ...
>
> Though I prefer saving the edits as they change...
>
> On Jan 23, 5:13 pm, A T <somecs...@gmail.com> wrote:
> > I'll give that a try. Will that really change anything, though? The
> > variables shouldn't change, especialy if the app is in focus. And right
> now
> > I save them onResume and onPause.
> >
>  > On Thu, Jan 22, 2009 at 5:54 PM, Sundog <sunns...@gmail.com> wrote:
> >
> > > Trying to post this again... Can you save your preferences when they
> > > change, instead of upon exit?
> >
> > > On Jan 22, 2:04 pm, A T <somecs...@gmail.com> wrote:
> > >  > I'm having this problem with one of my apps where some people are
> > > reporting
> > > > that their preferences are not being saved when they close and resume
> the
> > > > app. The preferences theyre talking about happen to be actual
> Preferences
> > > > (i.e. the built-in preferences manager for an activity). They say
> they're
> > > > not doing anything special, just exiting the app and going back to
> it.
> > > Does
> > > > anyone know why the prefs wouldn't be saved for only this select few
> > > people?
> > > > I'm at a complete loss.
> > > > Thank you
> >
>

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

Reply via email to