there are lots of questions out there related to shared preferences and the alternatives. My problem: when I shut down the device or kill the app, the shared preferences get
I've figured out a solution that works both, on my Acer and on my XOOM device: you have to call clear() on the editor before committing new data:
public void saveCollection(Context context){
SharedPreferences settings = context.getSharedPreferences(context.getString(R.string.restore_values), 0);
SharedPreferences.Editor e = settings.edit();
e.clear();
e.putStringSet(context.getString(R.string.collection), collection);
e.commit();
}