【发布时间】:2015-07-14 11:49:49
【问题描述】:
我已经用过phonegap状态栏通知插件。
它工作正常,但我想在应用关闭后收到通知。它只在应用关闭后 3-5 小时发出通知,但我想显示他们每天重复 10 次,离线 10 天。
【问题讨论】:
标签: cordova notifications background-service
我已经用过phonegap状态栏通知插件。
它工作正常,但我想在应用关闭后收到通知。它只在应用关闭后 3-5 小时发出通知,但我想显示他们每天重复 10 次,离线 10 天。
【问题讨论】:
标签: cordova notifications background-service
@Katzer 有一个插件,它具有您需要的所有功能。
Cordova Local Notification Plugin - by Katzer
因此,此插件能够向用户发送预定消息。因此,您需要设置某事。就像使用此 javascript 代码的提醒(用户可自定义的日期/时间):
cordova.plugins.notification.local.schedule({
id: 1,
title: "Production Jour fixe",
text: "Duration 1h",
firstAt: monday_9_am,
every: "week",
sound: "file://sounds/reminder.mp3",
icon: "http://icons.com/?cal_id=1",
data: { meetingId:"123#fg8" }
});
cordova.plugins.notification.local.on("click", function (notification) {
joinMeeting(notification.data.meetingId);
});
此示例代码是应用程序每周向用户发送的预定通知。
更多信息可以在伟大的文档中找到。
【讨论】: