diff --git a/README.md b/README.md index 15726b7..63eed6e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # JPush PhoneGap / Cordova Plugin [![Build Status](https://travis-ci.org/jpush/jpush-phonegap-plugin.svg?branch=master)](https://travis-ci.org/jpush/jpush-phonegap-plugin) -[![release](https://img.shields.io/badge/release-3.2.13-blue.svg)](https://github.com/jpush/jpush-phonegap-plugin/releases) +[![release](https://img.shields.io/badge/release-3.3.0-blue.svg)](https://github.com/jpush/jpush-phonegap-plugin/releases) [![platforms](https://img.shields.io/badge/platforms-iOS%7CAndroid-lightgrey.svg)](https://github.com/jpush/jpush-phonegap-plugin) [![weibo](https://img.shields.io/badge/weibo-JPush-blue.svg)](http://weibo.com/jpush?refer_flag=1001030101_&is_all=1) diff --git a/package.json b/package.json index 59a89ad..dec7419 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jpush-phonegap-plugin", - "version": "3.2.13", + "version": "3.3.0", "description": "JPush for cordova plugin", "cordova": { "id": "jpush-phonegap-plugin", diff --git a/plugin.xml b/plugin.xml index 3142dd8..8f6dcc1 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="3.3.0"> JPush JPush for cordova plugin @@ -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