Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; import android.widget.Adapter; public class Main { public static Adapter readUser(Context con) { Adapter at = null; SharedPreferences sp = con.getSharedPreferences("acToken", Context.MODE_PRIVATE); String key = sp.getString("key", null); String secret = sp.getString("secret", null); if (key != null) { // at=new AccessToken(key,secret); } return at; } }