Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; public class Main { public static void putBoolean(Context context, String key, boolean values) { SharedPreferences sp = context.getSharedPreferences("7Yan", context.MODE_PRIVATE); sp.edit().putBoolean(key, values).commit(); } }