小编jos*_*ero的帖子

使用phonegap cordova每天安排本地通知

我正在开发一个带有cordova的应用程序,我正在使用这个插件来安排每天到6点的本地通知 https://github.com/katzer/cordova-plugin-local-notifications

一切正常,这是我用来设置de Notification的代码

/*Set 6 o'clock*/
function setTestAlarm() {
    var notify = new Date();
    notify.setHours(18,00,00,00);

  localNotification.add({
        id:      1,
        title:   'My app',
        message: 'Hi this is a notification',
        repeat:  'daily',
        date:    notify,
        autoCancel: true, 
        ongoing: true, 
    });
Run Code Online (Sandbox Code Playgroud)

我正在进行测试,并且通知每天下午6点出现,但仅连续9天,然后停止出现.我究竟做错了什么?

谢谢

notifications localnotification phonegap-plugins cordova

6
推荐指数
1
解决办法
5031
查看次数