mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-02-15 00:22:50 +08:00
更新JPush540
This commit is contained in:
parent
c4ec7f3c2a
commit
7fafe5aea3
14
plugin.xml
14
plugin.xml
@ -117,7 +117,7 @@
|
||||
<activity
|
||||
android:name="cn.jpush.android.ui.PopWinActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/MyDialogStyle" >
|
||||
android:theme="@style/JPushDialogStyle" >
|
||||
<intent-filter>
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
@ -169,13 +169,13 @@
|
||||
<receiver android:name="cn.jpush.android.service.SchedulerReceiver" android:exported="false"/>
|
||||
|
||||
<!--since 3.3.0 接收JPush相关事件-->
|
||||
<service android:name="cn.jiguang.cordova.push.JPushEventReceiver"
|
||||
<receiver android:name="cn.jiguang.cordova.push.JPushEventReceiver"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
|
||||
<action android:name="cn.jpush.android.intent.RECEIVER_MESSAGE" />
|
||||
<category android:name="$PACKAGE_NAME"></category>
|
||||
</intent-filter>
|
||||
</service>
|
||||
</receiver>
|
||||
|
||||
<!--since 3.3.0 Required SDK核心功能-->
|
||||
|
||||
@ -236,9 +236,11 @@
|
||||
<meta-data android:name="JPUSH_CHANNEL" android:value="$CHANNEL"/>
|
||||
<meta-data android:name="JPUSH_APPKEY" android:value="$APP_KEY" /> <!-- </>值来自开发者平台取得的AppKey-->
|
||||
<provider
|
||||
android:exported="false"
|
||||
android:name="cn.jpush.android.service.InitProvider"
|
||||
android:authorities="${applicationId}.jiguang.InitProvider"
|
||||
android:name="cn.jpush.android.service.InitProvider"></provider>
|
||||
android:exported="false"
|
||||
android:readPermission="${applicationId}.permission.JPUSH_MESSAGE"
|
||||
android:writePermission="${applicationId}.permission.JPUSH_MESSAGE" />
|
||||
</config-file>
|
||||
|
||||
<lib-file src="src/android/libs/jpush-android-5.2.0.jar" />
|
||||
|
@ -15,16 +15,16 @@ import cn.jpush.android.api.CustomMessage;
|
||||
import cn.jpush.android.api.JPushMessage;
|
||||
import cn.jpush.android.api.NotificationMessage;
|
||||
import cn.jpush.android.helper.Logger;
|
||||
import cn.jpush.android.service.JPushMessageService;
|
||||
import cn.jpush.android.service.JPushMessageReceiver;
|
||||
|
||||
public class JPushEventReceiver extends JPushMessageService {
|
||||
public class JPushEventReceiver extends JPushMessageReceiver {
|
||||
|
||||
private static final String TAG = JPushEventReceiver.class.getSimpleName();
|
||||
|
||||
@Override
|
||||
public void onTagOperatorResult(Context context, JPushMessage jPushMessage) {
|
||||
super.onTagOperatorResult(context, jPushMessage);
|
||||
JLogger.d(TAG,"onTagOperatorResult:"+jPushMessage);
|
||||
cn.jiguang.cordova.push.JLogger.d(TAG,"onTagOperatorResult:"+jPushMessage);
|
||||
|
||||
tryCallback(jPushMessage, new SuccessCallback() {
|
||||
@Override
|
||||
@ -46,7 +46,7 @@ public class JPushEventReceiver extends JPushMessageService {
|
||||
public void onCheckTagOperatorResult(Context context, JPushMessage jPushMessage) {
|
||||
super.onCheckTagOperatorResult(context, jPushMessage);
|
||||
|
||||
JLogger.d(TAG,"onCheckTagOperatorResult:"+jPushMessage);
|
||||
cn.jiguang.cordova.push.JLogger.d(TAG,"onCheckTagOperatorResult:"+jPushMessage);
|
||||
|
||||
tryCallback(jPushMessage, new SuccessCallback() {
|
||||
@Override
|
||||
@ -61,7 +61,7 @@ public class JPushEventReceiver extends JPushMessageService {
|
||||
public void onAliasOperatorResult(Context context, JPushMessage jPushMessage) {
|
||||
super.onAliasOperatorResult(context, jPushMessage);
|
||||
|
||||
JLogger.d(TAG,"onAliasOperatorResult:"+jPushMessage);
|
||||
cn.jiguang.cordova.push.JLogger.d(TAG,"onAliasOperatorResult:"+jPushMessage);
|
||||
|
||||
tryCallback(jPushMessage, new SuccessCallback() {
|
||||
@Override
|
||||
@ -75,8 +75,8 @@ public class JPushEventReceiver extends JPushMessageService {
|
||||
|
||||
@Override
|
||||
public void onRegister(Context context, String regId) {
|
||||
JLogger.d(TAG,"onRegister:"+regId);
|
||||
JPushPlugin.transmitReceiveRegistrationId(regId);
|
||||
cn.jiguang.cordova.push.JLogger.d(TAG,"onRegister:"+regId);
|
||||
cn.jiguang.cordova.push.JPushPlugin.transmitReceiveRegistrationId(regId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -92,19 +92,19 @@ public class JPushEventReceiver extends JPushMessageService {
|
||||
public void onNotifyMessageArrived(Context context, NotificationMessage notificationMessage) {
|
||||
super.onNotifyMessageArrived(context, notificationMessage);
|
||||
|
||||
JLogger.d(TAG,"onNotifyMessageArrived:"+notificationMessage);
|
||||
cn.jiguang.cordova.push.JLogger.d(TAG,"onNotifyMessageArrived:"+notificationMessage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNotifyMessageOpened(Context context, NotificationMessage notificationMessage) {
|
||||
super.onNotifyMessageOpened(context, notificationMessage);
|
||||
JLogger.d(TAG,"onNotifyMessageOpened:"+notificationMessage);
|
||||
cn.jiguang.cordova.push.JLogger.d(TAG,"onNotifyMessageOpened:"+notificationMessage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMobileNumberOperatorResult(Context context, JPushMessage jPushMessage) {
|
||||
super.onMobileNumberOperatorResult(context, jPushMessage);
|
||||
JLogger.d(TAG,"onMobileNumberOperatorResult:"+jPushMessage);
|
||||
cn.jiguang.cordova.push.JLogger.d(TAG,"onMobileNumberOperatorResult:"+jPushMessage);
|
||||
|
||||
tryCallback(jPushMessage, new SuccessCallback() {
|
||||
@Override
|
||||
@ -119,11 +119,11 @@ public class JPushEventReceiver extends JPushMessageService {
|
||||
@Override
|
||||
public void onMultiActionClicked(Context context, Intent intent) {
|
||||
super.onMultiActionClicked(context, intent);
|
||||
JLogger.d(TAG,"onMultiActionClicked:"+intent);
|
||||
cn.jiguang.cordova.push.JLogger.d(TAG,"onMultiActionClicked:"+intent);
|
||||
}
|
||||
@Override
|
||||
public void onInAppMessageShow(Context context,final NotificationMessage message) {
|
||||
JLogger.d(TAG, "[onInAppMessageShow], " + message.toString());
|
||||
cn.jiguang.cordova.push.JLogger.d(TAG, "[onInAppMessageShow], " + message.toString());
|
||||
try {
|
||||
JSONObject jsonObject=new JSONObject();
|
||||
jsonObject.put("title", message.inAppMsgTitle);
|
||||
@ -141,7 +141,7 @@ public class JPushEventReceiver extends JPushMessageService {
|
||||
|
||||
@Override
|
||||
public void onInAppMessageClick(Context context,final NotificationMessage message) {
|
||||
JLogger.d(TAG, "[onInAppMessageClick], " + message.toString());
|
||||
cn.jiguang.cordova.push.JLogger.d(TAG, "[onInAppMessageClick], " + message.toString());
|
||||
try {
|
||||
JSONObject jsonObject=new JSONObject();
|
||||
jsonObject.put("title", message.inAppMsgTitle);
|
||||
@ -170,7 +170,7 @@ public class JPushEventReceiver extends JPushMessageService {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
CallbackContext callback = JPushPlugin.eventCallbackMap.get(sequence);
|
||||
CallbackContext callback = cn.jiguang.cordova.push.JPushPlugin.eventCallbackMap.get(sequence);
|
||||
|
||||
if (callback == null) {
|
||||
Logger.i(TAG, "Unexpected error, callback is null!");
|
||||
@ -194,7 +194,7 @@ public class JPushEventReceiver extends JPushMessageService {
|
||||
callback.error(resultJson);
|
||||
}
|
||||
|
||||
JPushPlugin.eventCallbackMap.remove(sequence);
|
||||
cn.jiguang.cordova.push.JPushPlugin.eventCallbackMap.remove(sequence);
|
||||
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
BIN
src/android/libs/jpush-android-5.4.0.jar
Normal file
BIN
src/android/libs/jpush-android-5.4.0.jar
Normal file
Binary file not shown.
@ -2,7 +2,7 @@
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/popLayoutId"
|
||||
style="@style/MyDialogStyle"
|
||||
style="@style/JPushDialogStyle"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="380dp" >
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<style name="MyDialogStyle">
|
||||
<style name="JPushDialogStyle">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
|
Loading…
Reference in New Issue
Block a user