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 LAT = "lat"; public static String getLAT(Context context) { SharedPreferences preferences = context.getSharedPreferences(LAT, Context.MODE_PRIVATE); String city = preferences.getString(CVALUE, "40.017349"); return city; } }