SHARE
TWEET

Simple example of Android SharedPreferences

a guest Mar 30th, 2010 726 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SharedPreferences prefs = getSharedPreferences( Constants.Settings.GLOBAL_PREFS, Context.MODE_PRIVATE );
  2. Editor editor = prefs.edit();
  3. editor.putInt( Constants.Settings.KEY_AUTOSIGNIN, 1 );
  4. editor.commit();
RAW Paste Data
Top