Java tutorial
//package com.java2s; import android.content.Context; import android.preference.PreferenceManager; public class Main { public static final String LOGGED_IN_USER_PREFERENCE_KEY = "logged_in_user"; public static void logOutAllUsers(Context context) { PreferenceManager.getDefaultSharedPreferences(context).edit().remove(LOGGED_IN_USER_PREFERENCE_KEY) .commit(); } }