Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; public class Main { public static void saveMutesState(String muteState, Context mContext) { if (mContext != null) { SharedPreferences preferences = mContext.getSharedPreferences("mute_setting", Context.MODE_PRIVATE); SharedPreferences.Editor editor = preferences.edit(); editor.putString("UPDATE_MUTE", muteState); editor.commit(); } } }