Beispiel #1
0
 public static void putBoolean(String key, boolean value) {
   BuyMilkApp.getContext()
       .getSharedPreferences(KEY_PREFS_NAME, Context.MODE_PRIVATE)
       .edit()
       .putBoolean(key, value)
       .apply();
 }
  public NotificationService() {
    super(NotificationService.class.getSimpleName());

    mContext = BuyMilkApp.getContext();
    mAlarmManager = (AlarmManager) mContext.getSystemService(ALARM_SERVICE);
  }
Beispiel #3
0
 public static boolean getBoolean(String key, boolean defaultValue) {
   return BuyMilkApp.getContext()
       .getSharedPreferences(KEY_PREFS_NAME, Context.MODE_PRIVATE)
       .getBoolean(key, defaultValue);
 }
Beispiel #4
0
 public static int getInt(String key, int defaultValue) {
   return BuyMilkApp.getContext()
       .getSharedPreferences(KEY_PREFS_NAME, Context.MODE_PRIVATE)
       .getInt(key, defaultValue);
 }
Beispiel #5
0
 private static class RemindDatabaseInstanceHolder {
   private static final RemindDatabase INSTANCE = new RemindDatabase(BuyMilkApp.getContext());
 }