Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; public class Main { private static final String PREFS = "cac"; private static final String PREF_INITIALISED = "initialised"; /** * Default mode for accessing shared preferences. */ private static final int MODE = Context.MODE_PRIVATE; public static void setIsInitialised(boolean value, Context context) { SharedPreferences.Editor prefsEditor = context.getSharedPreferences(PREFS, MODE).edit(); prefsEditor.putBoolean(PREF_INITIALISED, false); prefsEditor.commit(); } }