Android端清除指定消息

This commit is contained in:
George 2015-08-06 17:11:06 +08:00
parent ca2e52fe54
commit 3196aeff72
2 changed files with 8 additions and 0 deletions

View File

@ -46,6 +46,7 @@ public class JPushPlugin extends CordovaPlugin {
"setLatestNotificationNum", "setLatestNotificationNum",
"setPushTime", "setPushTime",
"clearAllNotification", "clearAllNotification",
"clearNotificationById",
"addLocalNotification", "addLocalNotification",
"removeLocalNotification", "removeLocalNotification",
"clearLocalNotifications", "clearLocalNotifications",

View File

@ -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){ JPushPlugin.prototype.setLatestNotificationNum = function(num){
if(device.platform == "Android") { if(device.platform == "Android") {
this.call_native("setLatestNotificationNum",[num],null); this.call_native("setLatestNotificationNum",[num],null);