Skip to content

Instantly share code, notes, and snippets.

@meeDamian
Created August 19, 2013 11:16
Show Gist options
  • Save meeDamian/6268035 to your computer and use it in GitHub Desktop.
Save meeDamian/6268035 to your computer and use it in GitHub Desktop.
// init
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
// put
sp.edit()
.putString("date", "" + System.currentTimeMillis())
.apply();
// get
String date = sp.getString("date", null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment