cordova当地通知

嗨,我正在开发一个程序。 我将本地通知集成到了程序中,但问题是我不能每天重复地执行它。

插入

我使用这个插件,并在设备准备好的index.js中写下这段代码。 它正常工作,但当我第一次添加通知它会给出错误。

cordova.plugins.notification.local.schedule({ id: 1, text: "Come and Evaluate your Friends!", firstAt: tomorrow_at_11_am, every: "day" }); 

firstAt:tomorrow_at_11_am部分不工作。 我怎样才能解决这个问题?

tomorrow_at_11_am

是一个variables。 示例网站缺less这个。 看看这里的文档:

https://github.com/katzer/cordova-plugin-local-notifications/wiki/04.-Scheduling

在那里你可以find:

at,firstAt(Date or Number)

系统发送本地通知的date和时间。 如果指定的值是零或是过去的date,则立即传送本地通知。 – 默认值:now〜new Date()