diff --git a/src/android/notification/Notification.java b/src/android/notification/Notification.java index 5dba9d54f..003ea7225 100644 --- a/src/android/notification/Notification.java +++ b/src/android/notification/Notification.java @@ -175,6 +175,10 @@ public void schedule() { context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT); if (isRepeating()) { + if (wasInThePast()) { + triggerTime = System.currentTimeMillis(); + } + getAlarmMgr().setRepeating(AlarmManager.RTC_WAKEUP, triggerTime, options.getRepeatInterval(), pi); } else { diff --git a/src/android/notification/Options.java b/src/android/notification/Options.java index 198a52f41..b2ad5d88f 100644 --- a/src/android/notification/Options.java +++ b/src/android/notification/Options.java @@ -213,10 +213,11 @@ public Date getTriggerDate() { * Trigger date in milliseconds. */ public long getTriggerTime() { - return Math.max( - System.currentTimeMillis(), - options.optLong("at", 0) * 1000 - ); +// return Math.max( +// System.currentTimeMillis(), +// options.optLong("at", 0) * 1000 +// ); + return options.optLong("at", 0) * 1000; } /**