Cordova本地通知 [英] Cordova Local Notification
问题描述
您好我正在开发一个程序。我整合了本地通知程序,但问题是我不能每天重复。
Hi I am developing a program. I integrated local notification to program, but problem is that i cant do it repeatly everyday .
我使用这个插件, js在设备就绪。它正常工作,但当我添加第一次通知它时会产生错误。
I used this plugin and wrote this code in index.js in device ready. it is working normally but when i add first time for notification it gives error.
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部分不工作。
firstAt: tomorrow_at_11_am part is not working. How can i fix this solution?
推荐答案
tomorrow_at_11_am
tomorrow_at_11_am
是一个变量。示例网站缺少此。请查看这里的文档:
is a variable. The example site is missing this. Have a look at the docs here:
https://github.com/katzer/cordova-plugin-local-notifications/wiki/04.-Scheduling
您可以在以下位置找到
firstAt(日期或数字)
at, firstAt (Date or Number)
系统应提交本地
通知的日期和时间。如果指定的值为nil或是过去的日期,
将立即传递本地通知。
- 默认值:now〜new Date()
The date and time when the system should deliver the local notification. If the specified value is nil or is a date in the past, the local notification is delivered immediately. - Default: now ~ new Date()
这篇关于Cordova本地通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!