diff --git a/plugin.xml b/plugin.xml index 3142dd8..3dc9d4d 100644 --- a/plugin.xml +++ b/plugin.xml @@ -161,25 +161,14 @@ - - - - - - - - - - - - + @@ -198,7 +187,7 @@ - + @@ -207,9 +196,9 @@ - + - + diff --git a/src/android/MyReceiver.java b/src/android/JPushReceiver.java similarity index 86% rename from src/android/MyReceiver.java rename to src/android/JPushReceiver.java index 2814af0..ffe62c2 100644 --- a/src/android/MyReceiver.java +++ b/src/android/JPushReceiver.java @@ -11,7 +11,7 @@ import java.util.Map; import cn.jpush.android.api.JPushInterface; -public class MyReceiver extends BroadcastReceiver { +public class JPushReceiver extends BroadcastReceiver { private static final List IGNORED_EXTRAS_KEYS = Arrays.asList( @@ -56,17 +56,14 @@ public class MyReceiver extends BroadcastReceiver { Intent launch = context.getPackageManager().getLaunchIntentForPackage( context.getPackageName()); - launch.addCategory(Intent.CATEGORY_LAUNCHER); - launch.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP); - context.startActivity(launch); + if (launch != null) { + launch.addCategory(Intent.CATEGORY_LAUNCHER); + launch.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP); + context.startActivity(launch); + } } private void handlingNotificationReceive(Context context, Intent intent) { - Intent launch = context.getPackageManager().getLaunchIntentForPackage( - context.getPackageName()); - launch.addCategory(Intent.CATEGORY_LAUNCHER); - launch.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP); - String title = intent.getStringExtra(JPushInterface.EXTRA_NOTIFICATION_TITLE); JPushPlugin.notificationTitle = title; diff --git a/src/android/libs/jpush-android-3.1.0.jar b/src/android/libs/jpush-android-3.1.0.jar deleted file mode 100755 index 7a50349..0000000 Binary files a/src/android/libs/jpush-android-3.1.0.jar and /dev/null differ diff --git a/src/android/libs/jpush-android-3.1.1.jar b/src/android/libs/jpush-android-3.1.1.jar new file mode 100755 index 0000000..8814f2c Binary files /dev/null and b/src/android/libs/jpush-android-3.1.1.jar differ