Java tutorial
//package com.java2s; import android.app.Activity; import android.content.SharedPreferences; public class Main { private static final String SETTINGS_FILE = "project4-settings"; public static SharedPreferences getSharedPrefs(Activity activity) { return activity.getSharedPreferences(SETTINGS_FILE, Activity.MODE_WORLD_READABLE); } }