From a3ad96f786a54938ab6ad0649e676372b164ab54 Mon Sep 17 00:00:00 2001 From: darkterrorooo Date: Wed, 9 Dec 2015 18:27:08 +0800 Subject: [PATCH] fix tortuous --- example/index.html | 8 ++++---- src/android/JPushPlugin.java | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/example/index.html b/example/index.html index b7f1520..4ca50d4 100644 --- a/example/index.html +++ b/example/index.html @@ -54,13 +54,13 @@ } var onReceiveNotification = function(event){ try{ - var alert + var alertContent if(device.platform == "Android"){ - alert = window.plugins.jPushPlugin.receiveNotification.alert; + alertContent = window.plugins.jPushPlugin.receiveNotification.alert; }else{ - alert = event.aps.alert; + alertContent = event.aps.alert; } - $("#notificationResult").html(alert); + $("#notificationResult").html(alertContent); } catch(exeption){ diff --git a/src/android/JPushPlugin.java b/src/android/JPushPlugin.java index d6f1583..8bed439 100644 --- a/src/android/JPushPlugin.java +++ b/src/android/JPushPlugin.java @@ -26,6 +26,8 @@ import cn.jpush.android.api.CustomPushNotificationBuilder; import cn.jpush.android.api.JPushInterface; import cn.jpush.android.data.JPushLocalNotification; import cn.jpush.android.api.TagAliasCallback; +import android.util.Log; + public class JPushPlugin extends CordovaPlugin { private final static List methodList =