Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Context; import android.content.SharedPreferences; public class Main { public static final String USER_CIDIOGRAPH = "user_cidiograph"; public static final String USER_INFO_OTHER = "user_info_other"; public static String getUserCidiograph(Context context) { SharedPreferences preferences = context.getSharedPreferences(USER_INFO_OTHER, Context.MODE_PRIVATE); String userLevel = preferences.getString(USER_CIDIOGRAPH, ""); return userLevel; } }