Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; public class Main { public static void cacheFapisLoginUser(String token, Context context) { SharedPreferences sharedPreferences = context.getSharedPreferences("configuration", 0); SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putString("token", token); editor.commit(); } }