android中的第一个通知后,重复的本地通知停止触发

时间:2019-07-27 08:49:33

标签: typescript ionic3 cordova-plugins localnotification

我想在一周的某些天中使用katzer的插件来触发本地通知cordova(例如:mon,tue,wed [1,2,3])。但是第一个通知被触发,然后它停止触发所有通知。 / p>

甚至将插件版本更新为0.9.0-beta.3。 下面是计划在星期一和星期二的下午3:10和下午4:10安排的代码。

cordova.plugins.notification.local.schedule({
                  id: parseInt(frequency[w].notificationID, 10),
                  title: obj.medication,
                  text: medicationObj.reminder || "Time to take Medicine",
                  foreground: true,
                  trigger: {
                    count: 5000,
                    every: {
                      weekday: 1,
                      hour: 3,
                      minute: 10
                    }
                  } //monday is 1 and so on.
                });
cordova.plugins.notification.local.schedule({
                  id: parseInt(frequency[w].notificationID, 10),
                  title: obj.medication,
                  text: medicationObj.reminder || "Time to take Medicine",
                  foreground: true,
                  trigger: {
                    count: 5000,
                    every: {
                      weekday: 1,
                      hour: 4,
                      minute: 10
                    }
                  } //monday is 1 and so on.
                });
cordova.plugins.notification.local.schedule({
                  id: parseInt(frequency[w].notificationID, 10),
                  title: obj.medication,
                  text: medicationObj.reminder || "Time to take Medicine",
                  foreground: true,
                  trigger: {
                    count: 5000,
                    every: {
                      weekday: 2,
                      hour: 3,
                      minute: 10
                    }
                  } //monday is 1 and so on.
                });
cordova.plugins.notification.local.schedule({
                  id: parseInt(frequency[w].notificationID, 10),
                  title: obj.medication,
                  text: medicationObj.reminder || "Time to take Medicine",
                  foreground: true,
                  trigger: {
                    count: 5000,
                    every: {
                      weekday: 2,
                      hour: 4,
                      minute: 10
                    }
                  } //monday is 1 and so on.
                });

通知在星期一的3:10 pm触发,然后停止触发所有通知。(星期一的4:10 pm和3:10 pm,星期二的4:10 pm不触发)

预期在用户选择的日期触发本地通知。

0 个答案:

没有答案