Android examples for Android OS:SharedPreferences
clear SharedPreferences
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; public class Main { public static boolean clear(Context context) { return getPrefs(context).edit().clear().commit(); }/*from www .j av a 2 s . co m*/ private static SharedPreferences getPrefs(Context context) { return PreferenceManager.getDefaultSharedPreferences(context); } }