Created
October 27, 2015 12:13
-
-
Save JulienGenoud/ef7e7f793232bee10155 to your computer and use it in GitHub Desktop.
sharedpref helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static SharedPreferences preferences; | |
private static SharedPreferences getAppPreference(Context context) { | |
if (preferences == null) { | |
preferences = context.getSharedPreferences(APP_PREFERENCE_NAME, Context.MODE_PRIVATE); | |
} | |
return preferences; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment