Just a quick question. I need to store one int in my app and SharedPreferences would be a neat and easy way to do it. Any objections to the use of it? Here is my code:
private SharedPreferences pref;
private Editor editor;
//-------------------------------
//get the best
pref = PreferenceManager.getDefaultSharedPreferences(this);
editor = pref.edit();
best = pref.getInt("value", 0);
//-------------------------------
//save the best
best = pref.getInt("value", best);
if(best < now){
editor.putInt("value", now);
editor.commit();