Here you can find the source of getIntSPR(String key, Context context)
public static int getIntSPR(String key, Context context)
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; public class Main { public static int getIntSPR(String key, Context context) { SharedPreferences preferences = PreferenceManager .getDefaultSharedPreferences(context); return preferences.getInt(key, 0); }/* w w w. ja va 2 s . c o m*/ }