android - Cordova 本地通知

标签 android ios cordova hybrid-mobile-app localnotification

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

plugin

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

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

firstAt:today_at_11_am 部分无法正常工作。我该如何解决这个问题?

最佳答案

tomorrow_at_11_am

是一个变量。示例站点缺少此内容。看看这里的文档:

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

在那里你可以找到:

at, firstAt (Date or Number)

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()

关于android - Cordova 本地通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34869998/

相关文章:

android - android训练Tesseract数据难实现?

ios - 我们可以在 Titanium Appcelerator ListView 中添加可点击按钮吗

android - 无法安装cordova插件

android - $.ajax POST 返回 "status":403 ,"statusText" :"Forbidden" cordova android

android - Camera.Parameters.setRecordingHint 和纵横比

android - 使用字符串数组的 ListView

android - 在 Android 中裁剪和调整图像大小

iPhone UIImagePickerController 视频播放器获取选定的视频位置

ios - 通过名称访问 Sprite 节点

带有多个标记的javascript googlemaps在使用cordova应用程序的android中不显示标记