This has been a recurring problem with K-9:
http://code.google.com/p/k9mail/issues/detail?id=143
and apparently the core Email as well:
http://www.androidforums.com/showthread.php?p=16842
and possibly other apps, too:
http://groups.google.com/group/android-developers/browse_thread/thread/5efd37a554f6f15a
http://www.mail-archive.com/android-developers@googlegroups.com/msg13141.html


Your observation about the < and > makes sense to me, as one reason
the preferences can fail to save or load is due to XML generation or
parsing problems.  I've thought that perhaps Base64 encoding all of
the preference values might be a smart move.

Dan.


On Jan 24, 11:56 am, Christoph Studer <chstu...@gmail.com> wrote:
> Hello,
>
> I'm making use of SharedPreferences in my application. One part is a
> PreferenceActivity and the other part is a backend that accesses the
> preferences using PreferenceManager.getDefaultSharedPreferences(...).
> Both parts are running in the same process, but potentially in
> different threads.
>
> Now, from time to time, I encounter a reset of all the preferences. It
> looks to me like this happens when my process is killed (e.g. when
> installing a new version or starting the activity or service the first
> time after a long time). However, it is not reproducible by killing
> the process manually and it does not happen consistently.
>
> Are there other people who have the same problem? Is there a race
> condition that could lead to something like this?
>
> The source code of my app can be found 
> here:http://code.google.com/p/android-sms/source/browse/
>
> The relevant files 
> are:http://code.google.com/p/android-sms/source/browse/trunk/android-clie...
> andhttp://code.google.com/p/android-sms/source/browse/trunk/android-clie...
>
> Thank you,
>
> Christoph

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