Loading src/android/Restore.java +10 −0 Changes for src/android/Restore.java: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -54,6 +54,16 @@ public class Restore extends BroadcastReceiver { for (String alarmId : alarmIds) { try { JSONArray args = new JSONArray(alarms.getString(alarmId, "")); /* If this notification was registered for a time when the * device was off then change the date to now to ensure that no * notifications are missed */ Date now = new Date(); if (now.after(new Date(args.optLong("date") * 1000))) { args.put("date", (now.getTime() / 1000)); } Options options = new Options(context).parse(args.getJSONObject(0)); LocalNotification.add(options); Loading Loading
src/android/Restore.java +10 −0 Changes for src/android/Restore.java: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -54,6 +54,16 @@ public class Restore extends BroadcastReceiver { for (String alarmId : alarmIds) { try { JSONArray args = new JSONArray(alarms.getString(alarmId, "")); /* If this notification was registered for a time when the * device was off then change the date to now to ensure that no * notifications are missed */ Date now = new Date(); if (now.after(new Date(args.optLong("date") * 1000))) { args.put("date", (now.getTime() / 1000)); } Options options = new Options(context).parse(args.getJSONObject(0)); LocalNotification.add(options); Loading