Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; public class Main { private static final String STORE_NAME = "TestStore"; private static final String STORE_KEY_PREFIX = "TESY_STORE_"; public static void storeFloat(Context context, String key, float value) { SharedPreferences pre = context.getSharedPreferences(STORE_NAME, Context.MODE_PRIVATE); pre.edit().putFloat(STORE_KEY_PREFIX + key, value).commit(); } }