Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; public class Main { private static final String AIO_SHARE_PREFS = "aio_common_share_prefs"; public static void putFloatValue(Context mContext, String key, float f) { SharedPreferences pref = mContext.getSharedPreferences(AIO_SHARE_PREFS, Context.MODE_MULTI_PROCESS); SharedPreferences.Editor editor = pref.edit(); editor.putFloat(key, f); editor.commit(); } }