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 CONFIG = "config"; private static final String KEY_PS = "pull_sen"; public static final float DEFAULT_PULL_SENSITIVITY = 1.8f; public static float pullSen(Context context) { SharedPreferences sp = context.getSharedPreferences(CONFIG, Context.MODE_PRIVATE); return sp.getFloat(KEY_PS, DEFAULT_PULL_SENSITIVITY); } }