Javascript 触发时重新安排Cordova本地通知

Javascript 触发时重新安排Cordova本地通知,javascript,cordova,cordova-plugins,Javascript,Cordova,Cordova Plugins,我正在尝试获取本地通知,以便在原始通知触发后以不同的间隔重新安排 var now = new Date().getTime(); _10_sec_from_now = new Date(now + 10*1000); cordova.plugins.notification.local.schedule({ id: 1, title: "Notification Title", text: "Notification Message&quo

我正在尝试获取本地通知,以便在原始通知触发后以不同的间隔重新安排

var now = new Date().getTime();
_10_sec_from_now = new Date(now + 10*1000);

cordova.plugins.notification.local.schedule({
    id: 1,
    title: "Notification Title",
    text: "Notification Message",
    at: _10_sec_from_now,
    foreground: true,
    group: 'groupA'
});

cordova.plugins.notification.local.on('trigger', function (notification) {
    var now = new Date().getTime();
    _30_sec_from_now = new Date(now + 30*1000);

    cordova.plugins.notification.local.schedule({
        id: notification.id,
        title: "Reset Notification Title",
        text: "Reset Notification Message",
        at: _30_sec_from_now,
        foreground: true,
        group: 'groupA'
    });
});
初始通知会触发,但如果从状态栏中清除toast,则不会触发后续通知。如果toast未被清除,通知将继续按预期触发。这似乎是由于重复使用了id造成的。如果我清除通知toast,则任何具有该id的其他计划通知都是非计划通知

有没有办法重用通知id?我将该值与存储在触发器后检索的数组中的信息相关联