I am running the emulator with the Eclipse IDE.
I can't get basic persistent storage 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---