Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Context; import android.content.SharedPreferences; public class Main { private static final String ACCESS_TOKEN = "access_token"; private static final String EXPIRES_IN = "expires_in"; private static final String UID = "uid"; public static void logOut(Context context) { SharedPreferences pref = context.getSharedPreferences(context.getPackageName() + "_preferences", 0); pref.edit().putString(ACCESS_TOKEN, "").putString(EXPIRES_IN, "").putString(UID, "").commit(); } }