List of usage examples for android.content SharedPreferences getString
@Nullable String getString(String key, @Nullable String defValue);
From source file:Main.java
public static String getHomeBindingAppToLaunchPackageName(Context context) { SharedPreferences sp = context.getSharedPreferences(ALMOSTNEXUS_PREFERENCES, Context.MODE_PRIVATE); return sp.getString("homeBindingAppToLaunchPackageName", ""); }
From source file:Main.java
public static String getString(Context context, String key) { SharedPreferences sharedPreferences = context.getSharedPreferences("atqiye", Context.MODE_PRIVATE); return sharedPreferences.getString(key, ""); }
From source file:Main.java
public static Adapter readUser(Context con) { Adapter at = null;/*w w w . j a va 2 s. com*/ SharedPreferences sp = con.getSharedPreferences("acToken", Context.MODE_PRIVATE); String key = sp.getString("key", null); String secret = sp.getString("secret", null); if (key != null) { // at=new AccessToken(key,secret); } return at; }
From source file:Main.java
public static String getStringProperty(Context context, String key) { SharedPreferences sp = context.getSharedPreferences(DEFAULT_FILE_NAME, Context.MODE_PRIVATE); return sp.getString(key, null); }
From source file:Main.java
public static String getLatestQuestionSaved(Context context) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); String questionUrl = prefs.getString(PREF_LATEST_QUESTION, null); return questionUrl; }
From source file:Main.java
public static String getSwipeUpAppToLaunchName(Context context) { SharedPreferences sp = context.getSharedPreferences(ALMOSTNEXUS_PREFERENCES, Context.MODE_PRIVATE); return sp.getString("swipeUpAppToLaunchName", ""); }
From source file:Main.java
public static String getDoubleTapAppToLaunchName(Context context) { SharedPreferences sp = context.getSharedPreferences(ALMOSTNEXUS_PREFERENCES, Context.MODE_PRIVATE); return sp.getString("doubleTapAppToLaunchName", ""); }
From source file:Main.java
public static String getFaceUri(String faceId, Context context) { SharedPreferences faceIdUriMap = context.getSharedPreferences("FaceIdUriMap", Context.MODE_PRIVATE); return faceIdUriMap.getString(faceId, ""); }
From source file:Main.java
public static String getThemePackageName(Context context, String default_theme) { SharedPreferences sp = context.getSharedPreferences(ALMOSTNEXUS_PREFERENCES, Context.MODE_PRIVATE); return sp.getString("themePackageName", default_theme); }
From source file:Main.java
public static String getSharedPreferences(Context ct, String key, String name) { if (key == null) { return null; }// ww w . j a v a 2s .co m SharedPreferences sPreferences = ct.getSharedPreferences(name, Context.MODE_PRIVATE); String value = sPreferences.getString(key, null); return value; }