Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Context; import android.content.SharedPreferences; public class Main { private static final String EXT_CONFIG = "ext_config"; private static final String KEY_IS_RUNNING = "is_running"; public static boolean isRunning(Context context) { SharedPreferences sp = context.getSharedPreferences(EXT_CONFIG, Context.MODE_PRIVATE); return sp.getBoolean(KEY_IS_RUNNING, false); } }