From 3196aeff72ee3702249359f89a045e59da85da85 Mon Sep 17 00:00:00 2001 From: George Date: Thu, 6 Aug 2015 17:11:06 +0800 Subject: [PATCH] =?UTF-8?q?Android=E7=AB=AF=E6=B8=85=E9=99=A4=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/android/JPushPlugin.java | 1 + www/JPushPlugin.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/android/JPushPlugin.java b/src/android/JPushPlugin.java index 171d2cf..d71db60 100644 --- a/src/android/JPushPlugin.java +++ b/src/android/JPushPlugin.java @@ -46,6 +46,7 @@ public class JPushPlugin extends CordovaPlugin { "setLatestNotificationNum", "setPushTime", "clearAllNotification", + "clearNotificationById", "addLocalNotification", "removeLocalNotification", "clearLocalNotifications", diff --git a/www/JPushPlugin.js b/www/JPushPlugin.js index a830f5e..3937c42 100644 --- a/www/JPushPlugin.js +++ b/www/JPushPlugin.js @@ -253,6 +253,13 @@ JPushPlugin.prototype.clearAllNotification = function(){ } } +JPushPlugin.prototype.clearNotificationById = function(notificationId){ + if(device.platform == "Android") { + data=[] + this.call_native("clearNotificationById",[notificationId],null); + } +} + JPushPlugin.prototype.setLatestNotificationNum = function(num){ if(device.platform == "Android") { this.call_native("setLatestNotificationNum",[num],null);