Try putting in xml special characters into the strings you are saving
directly with the editor without xml-escaping them, e.g. &'<>" and see
if this reproduces the problem when you try to read in the saved
preferences after your app has been killed (after a reboot, for
example).

On May 7, 5:24 am, so_is <festival.s...@googlemail.com> wrote:
> Thank you very much for your comment Mark.
>
> Well at the moment I am prior to redo the whole preferences saving my
> settings into a Sqlite database.
>
> I can not find the bug in my code and my app relies on this settings
> so I don't see any other chance to get rid of the lost settings bug.
>
> On May 6, 12:56 pm, Mark Murphy <mmur...@commonsware.com> wrote:
>
> > so_is wrote:
> > > Well Mark the problem is that I am using the suggested way to save the
> > > settings. I do commit every single edit() like suggested. But a lot of
> > > users are still reporting that they lose settings. I don't know why
> > > but it happens some times. :( (I have worked with my app for 2 months
> > > now and have never lost the settings)
>
> > It will be difficult to fix the bug without a repeatable scenario.
>
> > > To sum up I don't like the suggestion using Sqlite because I would
> > > just ignore a bug which is obviously there but no one knows what it
> > > really is.
>
> > If you can come up with a repeatable scenario for theSharedPreferences
> > damage, post an issue tohttp://b.android.comwitha project and
> > instructions for causing the problem.
>
> > Otherwise, if I were in your shoes, I would switch to some other means
> > (e.g., SQLite) of storing the data you are storing inSharedPreferences,
> > simply to make your users happy.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Warescription: Three Android Books, Plus Updates, $35/Year
--~--~---------~--~----~------------~-------~--~----~
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