【问题标题】:phonegap statusbar notification how to send offline notification daily repeating 10 times a day after app is closed?phonegap状态栏通知如何在应用关闭后每天重复发送离线通知10次?
【发布时间】:2015-07-14 11:49:49
【问题描述】:

我已经用过phonegap状态栏通知插件。

它工作正常,但我想在应用关闭后收到通知。它只在应用关闭后 3-5 小时发出通知,但我想显示他们每天重复 10 次,离线 10 天。

【问题讨论】:

    标签: cordova notifications background-service


    【解决方案1】:

    @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);
    });
    

    此示例代码是应用程序每周向用户发送的预定通知。

    更多信息可以在伟大的文档中找到。

    【讨论】:

    • 感谢您的回复 Sithys.Local 通知插件在 catlog 中显示错误无法在此代码行“cordova.plugins.notification.local.schedule({" .我无法正确安装这个插件..请帮助我。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-12
    相关资源
    最近更新 更多