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

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