Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; public class Main { private static final String StrogeB = "StrogeB"; private static final String StrogeB_K = "StrogeB_k"; public static void putStrogeB(Context context, boolean value) { SharedPreferences sharedPreferences = context.getSharedPreferences(StrogeB, Context.MODE_PRIVATE); SharedPreferences.Editor edit = sharedPreferences.edit(); edit.putBoolean(StrogeB_K, value); edit.commit(); } }