Well I figured out how to make this work. I was doing the store in the onDestroy routine. Perhaps the class that I was calling for reference data probably had its data cleared out? Anyway, when I moved the store request within the main runtime area it started working.
On Mar 22, 5:32 pm, "godsy...@gmail.com" <godsy...@gmail.com> wrote: > I am running the emulator with the Eclipse IDE. > I can't get basicpersistentstorage to work while running within the > emulator. > > SharedPreferences mPrefs ; > > OnCreate() > { > mPrefs = getPreferences(MODE_PRIVATE); > String teststring = mPrefs.getString("test", "init value") ; > > } > > Then in the application the user initiates a change like this. > > SharedPreferences.Editor ed = mPrefs.edit(); > ed.putString("test", "new value" ); > ed.commit(); > > ed.commit() is returning a false which means it failed to store. > Later reading of the saved value shows it was not saved. > > I tried this with SharedPreferences with the same result. > My understanding is that getPreferences just does a specific call to > SharedPreferences. > > Thanks for any help. > AG --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---