Java tutorial
//package com.java2s; import android.app.Activity; import android.content.SharedPreferences; public class Main { public static final String WENDLER_KEY = "USE_WENDLER_MAX"; public static final String FILE_KEY = "LiftbookSettingsFile"; public static void SetWendlerMax(Activity a, boolean value) { SharedPreferences sp = a.getSharedPreferences(FILE_KEY, Activity.MODE_PRIVATE); SharedPreferences.Editor ed = sp.edit(); ed.putBoolean(WENDLER_KEY, value); ed.commit(); } }