cordova plugin add org.apache.cordova.device
cordova plugin add https://github.com/katzer/cordova-plugin-local-notifications.git && cordova prepare

1.

需要上面的两个插件 安装插件
在deviceready 设备准备好了调用插件的方法:
notification.local.add
notification.local.cancel
notification.local.cancelAll
notification.local.isScheduled
notification.local.getScheduledIds
notification.local.isTriggered
notification.local.getDefaults
notification.local.setDefaults
notification.local.onadd
notification.local.ontrigger
notification.local.onclick
notification.local.oncancel
2.具体如下:

document.addEventListener('deviceready', function () {
// window.plugin.notification.local is now available
var now = new Date().getTime();
_60_seconds_from_now = new Date(now + 60 * 1000);
window.plugin.notification.local.add({
id: 1,
title: 'Reminder',
message: 'Dont forget to buy some flowers.',
badge: 1,
autoCancel: true,
date: _60_seconds_from_now
});
window.plugin.notification.local.onclick = function(id, state, json) { window.plugin.notification.local.cancelAll(); };
}, false);

  

cordova local notification plugin的更多相关文章

  1. [转]com.devicepush.cordova-phonegap Device Push Notification Plugin

    本文转自:https://www.npmjs.com/package/com.devicepush.cordova-phonegap Device Push Notification Plugin D ...

  2. Jenkis Editable Email Notification Plugin 使用介绍

    Jenkis Editable Email Notification Plugin 使用介绍 前言 Jenkins本身提供的Email插件功能实在有限,只能提供当前Job的基本信息,比如成功.失败以及 ...

  3. ios push local notification

    UILocalNotification* localNotification = [[UILocalNotification alloc]init]; localNotification.alertB ...

  4. Local Notification

    大家都知道Push Notification,这个东西需要联网才可以用.iOS4起,苹果引入了一种可以在设备内部引发的notification.不需要复杂的服务器编程,或其他复杂的配置.这个技术就是L ...

  5. iOS 远程通知(Remote Notification)和本地通知(Local Notification)

    ios通知分为远程通知和本地通知,远程通知需要连接网络,本地通知是不需要的,不管用户是打开应用还是关闭应用,我们的通知都会发出,并被客户端收到 我们使用远程通知主要是随时更新最新的数据给用户,使用本地 ...

  6. Cordova 3.0 Plugin 安装 及"git" command line tool is not installed

    根据http://docs.phonegap.com/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface Windows命令行 ...

  7. 对cordova插件配置文件plugin.xml的理解

    1.配置文件表头包括了插件id,是用于唯一标识插件的.同时插件配置了一个插件名称. 2.这个文件从工作机制,也就是js代码一直到native的java插件代码工作分成两个流程.第一个流程是从代码到插件 ...

  8. iOS 10.0之前和之后的Local Notification有神马不同

    在iOS 10.0之前apple还没有将通知功能单独拿出来自成一系.而从10.0开始原来的本地通知仍然可用,只是被标记为过时.于是乎我们可以使用10.0全新的通知功能.别急-让我们慢慢来,先从iOS ...

  9. Jenkins-Dingding Notification Plugin 配置

    具体内容请移步Jenkins官网或作者Github,本文仅为实践分享,记录几个小坑! 感谢插件作者的贡献! 转载注明出处:http://www.cnblogs.com/ityoung/p/648915 ...

随机推荐

  1. 黄聪:Discuz!X3.2 如何配置超级版主或者某些管理员,允许管理用户组或者权限

    点击后台-->站长-->后台管理团队-->新增用户(用户名)用户管理员即可

  2. PO_PO系列 - 询价报价单管理分析(案例)

    2014-07-01 Created By BaoXinjian

  3. BIP_BI Publisher Administrator设定Configuration/Font/Currencies(案例)

    2014-08-08 Created By BaoXinjian

  4. 发布在IIS上的Web程序,调用服务器的COM组件

    场景大致是这样的,在工厂中分布着许多的PDA点,这些PDA点都要进行实时的扫描--打印操作.实现方法是采用网络打印机,然后服务器安装驱动,管理着所有的打印机.然后服务器,发布一个WebService, ...

  5. 【Java】PrettyTime

    package test; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.D ...

  6. 在eclipse中下载包含子模块(Submodules)的git项目

    先将项目下载下来 , 这时由于是子项目的原因 , 下载的项目中不包含任何子项目 . 这时在eclipse的Git Repositories中 , 选中Submodules , 右键点击update即可 ...

  7. header('Content-type:text/html;charset = utf-8');出现中文乱码

    header('Content-type:text/html;charset = utf-8'); "="两旁不能留空格,必须紧密连写,否则出现乱码;

  8. Async/Await - Best Practices in Asynchronous Programming z

    These days there’s a wealth of information about the new async and await support in the Microsoft .N ...

  9. Zabbix监控mysql配置及故障告警配置

    本文主要介绍zabbix监控mysql的配置,包含使用zabbix自带模板监控mysql相关信息及自定义key监控mysql同步情况.同时介绍了触发器的创建及zabbix通过邮件方式告警配置. 一.配 ...

  10. dual

    1. dual 确实是一张表.是一张只有一个字段,一行记录的表. 2.习惯上,我们称之为'伪表'.因为他不存储主题数据.3. 他的存在,是为了操作上的方便.因为select 都是要有特定对象的.如:s ...