Matt (preinvent) wrote:
>>> OK, my app just did this again - wiped my DB and the sharedpreferences
>>> that I set manually using the edit/putstring/commit system.
>> How did you do this?
> 
> I can't reproduce it - sometimes it just does it.

Sorry, I misread your previous post -- I though you wiped it yourself.

> Lol, you lost me there ;)

Infocom's _The Hitchhiker's Guide to the Galaxy_ game. I gave up at the
"tea"/"no tea" problem, which is just as well, considering the twist I
found out later they put at the end.

>> The PreferenceActivity should use
>> PreferenceManager.getDefaultSharedPreferences() as its source of
>> preference data.
> 
> I'm setting the preferences file manually in my PrferencesActivity:
> 
>       protected void onCreate(Bundle savedInstanceState) {
>               super.onCreate(savedInstanceState);
>               context = this;
>       
> getPreferenceManager().setSharedPreferencesName(WidgetHelpers.PREFS_NAME);
>               setPreferenceScreen(createPreferenceHierarchy());
>       }
> 

Out of curiosity, why? Have you tried not doing this, and just using
PreferenceManager.getDefaultSharedPreferences() everywhere, to see if
this is somehow contributing to your woe?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training in US: 14-18 June 2010: http://bignerdranch.com

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