Android examples for Android OS:SharedPreferences
Method to clear Preference in SharedPreferences
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; public class Main { /**/*from w w w . j av a2 s.c o m*/ * Method clearPreference ... * * @param paramContext of type Context */ public static void clearPreference(Context paramContext) { SharedPreferences.Editor localEditor = paramContext .getSharedPreferences("com.java2s", 0).edit(); localEditor.clear(); localEditor.commit(); } }