Java tutorial
//package com.java2s; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; public class Main { private static void writeCache(int[] screen, Activity activity) { SharedPreferences config = activity.getSharedPreferences("config", Context.MODE_PRIVATE); Editor editor = config.edit(); editor.putBoolean("isAlreadyGetPhoneResolution", true); editor.putInt("height", screen[0]); editor.putInt("width", screen[1]); editor.commit(); } }