> > 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. It seems more likely to happen after a power cycle but I can't make it happen when I want it to. However, as my app responds to these occurrences anyway it's hard to say if this really is an issue caused by Android or my app. All my DB writing is done via transactions as documented: db.beginTransaction(); try { db.execSQL(<...whatever...>); db.setTransactionSuccessful(); } finally { db.endTransaction(); } > > However, > > it did NOT wipe the shared preferences set by my PreferenceActivity. > > I'm positive they're stored in the same place as I can iterate through > > the same shared prefs and get settings stored both manually and via my > > prefs page. > > Ummmm...to me, this is a "tea" and "no tea" situation. > > (and for the five of you who get the reference, that game drove me up a > frakkin' wall...) Lol, you lost me there ;) > You can see the actual files on the emulator using DDMS' File Manager. > They'll be in: > > /data/data/your.package.here/databases > /data/data/your.package.here/shared_prefs Looks like rooting is in order here! > 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()); } -- 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