Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; public class Main { private static String JPushID = "JPushID"; private static String JPushID_K = "JPushID_K"; public static void putJPushID(Context context, String value) { SharedPreferences sharedPreferences = context.getSharedPreferences(JPushID, Context.MODE_PRIVATE); SharedPreferences.Editor edit = sharedPreferences.edit(); edit.putString(JPushID_K, value); edit.commit(); } }