private static void SetNotifiyPreAlarm(Alarm alarm, long diffMillis) { if (diffMillis < TimeSpan.FromMinutes(5).TotalMilliseconds) { NotificationAndroid.NotifyPreAlarm(alarm, SetAlarmIntent(alarm)); } else { SetNotificationPreAlarmByManager(alarm, diffMillis); } }
private void NotifyFaieldAlarmAndFinish() { NotificationAndroid.NotifyFailedAlarm(Activity.alarm, Activity.AlarmTimeNow); Activity.FinishAndRemoveTask(); }
public void DeleteAlarm(int id) { AlarmHelper.DeleteAlarmByManager(id); AlarmHelper.DeletePreAlarmByManager(id); NotificationAndroid.CancelLaterNotification(Application.Context, id); }
public void SetAlarm(Alarm alarm) { NotificationAndroid.CancelLaterNotification(Application.Context, alarm.Id); AlarmHelper.SetAlarmAtFirst(alarm); }