Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Context; import android.content.SharedPreferences; public class Main { public static final String CVALUE = "cvalue"; public static final String USERPIC = "userpic"; public static String getUserPic(Context context) { SharedPreferences preferences = context.getSharedPreferences(USERPIC, Context.MODE_PRIVATE); String city = preferences.getString(CVALUE, "null"); return city; } }