Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; public class Main { private static final String KEY_P = "main_guide_show"; private static final String KEY_V = "show"; public static boolean needShow(Context ct) { boolean b = false; if (ct != null) { SharedPreferences sp = ct.getSharedPreferences(KEY_P, Context.MODE_PRIVATE); if (sp != null) { b = sp.getBoolean(KEY_V, true); } } return b; } }