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

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