SharedPreferences should be completely thread safe.  Also, all of the normal
calls the system makes to your components happen in the same main thread of
the process, so except for special cases (as described in the app model doc)
you shouldn't be dealing with multithreading.

Are all of these components running in the same process?  Right now
SharedPreferences does not deal well with multiple components in separate
processes trying to use the same preferences data.

On Tue, Nov 18, 2008 at 6:24 PM, Eric B <[EMAIL PROTECTED]> wrote:

>
> I have a PreferenceActivity that uses an xml file to automatically
> populate and save the preferences.  Sometimes though, when that
> activity is started, the preferences are blank.  However, if you go
> back later, they will reappear.
>
> This is causing a lot of headaches with my app.  I have a Service and
> BroadcastReciever running in the background that are also accessing
> and (sometimes) updating the preferences.  Are there synchronization
> issues with shared preferences?  Maybe permission issues?
>
> I'm really stuck here and would greatly appreciate any insight you can
> offer.
>
> Thanks,
> Eric
> >
>


-- 
Dianne Hackborn
[EMAIL PROTECTED]

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