Back to project page SCBIO-OneButtonLarry.
The source code is released under:
MIT License
If you think the Android project SCBIO-OneButtonLarry listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.scbio.onebuttonlarry; //from w w w .j a v a2 s . c o m import android.content.Context; import android.content.SharedPreferences; public class PreferencesManager { public static void storeMusicPreference(Context context, boolean state){ SharedPreferences pref = context.getSharedPreferences("preferences", Context.MODE_PRIVATE); SharedPreferences.Editor editor = pref.edit(); editor.putBoolean("MusicState", state); editor.commit(); } public static boolean loadMusicPreference(Context context){ SharedPreferences pref = context.getSharedPreferences("preferences", Context.MODE_PRIVATE); return pref.getBoolean("MusicState", true); } }