Back to project page AURHelperDroid.
The source code is released under:
Apache License
If you think the Android project AURHelperDroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.stomachion.aurhelperdroid.utils; /*w w w . ja v a2 s . c om*/ import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; /** * User: Pedro Veloso */ public class Prefs { /** * @param ctx app context * @return True if this is the first time the app is initialized, False otherwise */ public static boolean getIsFirstTime(Context ctx) { SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(ctx); return settings.getBoolean(Constants.PREF_FIRST_TIME, true); } public static void setIsFirstTime(Context ctx, boolean newValue) { SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(ctx); SharedPreferences.Editor editor = settings.edit(); editor.putBoolean(Constants.PREF_FIRST_TIME, newValue); editor.commit(); } }