From 4ed844e0c5cff372f43ca755ed553521cf545376 Mon Sep 17 00:00:00 2001 From: Hevin <328066446@qq.com> Date: Fri, 13 May 2016 10:49:36 +0800 Subject: [PATCH] support rich push. --- README.md | 2 +- package.json | 2 +- plugin.xml | 19 ++++++- src/android/MyReceiver.java | 4 ++ src/android/ic_richpush_actionbar_back.png | Bin 0 -> 695 bytes src/android/ic_richpush_actionbar_divider.png | Bin 0 -> 181 bytes src/android/jpush_popwin_layout.xml | 15 ++++++ src/android/jpush_style.xml | 13 +++++ src/android/jpush_webview_layout.xml | 51 ++++++++++++++++++ src/android/richpush_btn_selector.xml | 21 ++++++++ 10 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 src/android/ic_richpush_actionbar_back.png create mode 100644 src/android/ic_richpush_actionbar_divider.png create mode 100644 src/android/jpush_popwin_layout.xml create mode 100644 src/android/jpush_style.xml create mode 100644 src/android/jpush_webview_layout.xml create mode 100644 src/android/richpush_btn_selector.xml diff --git a/README.md b/README.md index 005dab8..d4f86ef 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/jpush/jpush-phonegap-plugin.svg?branch=master)](https://travis-ci.org/jpush/jpush-phonegap-plugin) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jpush/jpush-phonegap-plugin) -[![release](https://img.shields.io/badge/release-2.1.4-blue.svg)](https://github.com/jpush/jpush-phonegap-plugin/releases) +[![release](https://img.shields.io/badge/release-2.1.5-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 6454456..59781b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jpush-phonegap-plugin", - "version": "2.1.6", + "version": "2.1.7", "description": "JPush for cordova plugin", "cordova": { "id": "cn.jpush.phonegap.JPushPlugin", diff --git a/plugin.xml b/plugin.xml index 342682b..d37581a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="2.1.7"> JPush Plugin JPush for cordova plugin @@ -95,6 +95,13 @@ + + + + + @@ -177,5 +185,14 @@ + + + + + + + + + diff --git a/src/android/MyReceiver.java b/src/android/MyReceiver.java index 5e35039..bcea33a 100644 --- a/src/android/MyReceiver.java +++ b/src/android/MyReceiver.java @@ -30,6 +30,10 @@ public class MyReceiver extends BroadcastReceiver { handlingNotificationReceive(context, intent); } else if (JPushInterface.ACTION_NOTIFICATION_OPENED.equals(action)) { handlingNotificationOpen(context, intent); + } else if (JPushInterface.ACTION_RICHPUSH_CALLBACK.equals(action)) { + // 当在 HTML 页面中调用 JPushWeb.triggerNativeAction(String params) 方法时触发此方法, + // 再进行相关的操作。 + } else { Log.d(TAG, "Unhandled intent - " + action); } diff --git a/src/android/ic_richpush_actionbar_back.png b/src/android/ic_richpush_actionbar_back.png new file mode 100644 index 0000000000000000000000000000000000000000..c9f4e4d6f58755e267fa3204ea01f7b1a90b8ffa GIT binary patch literal 695 zcmV;o0!aOdP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv00000008+zyMF)x010qNS#tmY3labT3lag+-G2N400J9HL_t(o!|m74YtvvD z2k>w9K2O`MWyM;(Z5OME;?+*rt%sh)lLtHh072Pd!u$hV{e{KhZXP@cUc9U;1;Mk0 zw$NU@tOqwxL##{Gl905C2WuI%>THu%qz~ls5|YoG_uw@^S zAP!9oaV3+vA&Acj;yFP)GfBi*K^zgp(iAa8OcAc@x|*gnlZzLw3gR<48!=kzMj2PE|*{Dat}YJQmJ4h90_;@2#04ou~(AT?mLNVh13>x^ynf;x22-t87k%ATrj#v{|u&9tDT=>24Fh7yL*>?jT48(>@*rV-vid4 zFoi?BH&^$CaRBr9{`1-c(CoDB_E;eYFh34e d#;^zg_y!W5A%w0v1jGOU002ovPDHLkV1jgDDD?mU literal 0 HcmV?d00001 diff --git a/src/android/ic_richpush_actionbar_divider.png b/src/android/ic_richpush_actionbar_divider.png new file mode 100644 index 0000000000000000000000000000000000000000..f289651b29c606b8cc8062d94026f8ac05beddb2 GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^OhBy3!3HGd@BX+5q*&4&eH|GXHuiJ>Nn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!tD$=lrpNCUx7=iT){ zinG8YvY3H^TL^?1FWs&C0~D0>ba4!kxSagw=j-hv%s?Q_EYf3?af*RqDhG2^=LudN OkO`iyelF{r5}E+c5-QUG literal 0 HcmV?d00001 diff --git a/src/android/jpush_popwin_layout.xml b/src/android/jpush_popwin_layout.xml new file mode 100644 index 0000000..f43e478 --- /dev/null +++ b/src/android/jpush_popwin_layout.xml @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/src/android/jpush_style.xml b/src/android/jpush_style.xml new file mode 100644 index 0000000..81dfdbb --- /dev/null +++ b/src/android/jpush_style.xml @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/src/android/jpush_webview_layout.xml b/src/android/jpush_webview_layout.xml new file mode 100644 index 0000000..19faa43 --- /dev/null +++ b/src/android/jpush_webview_layout.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/android/richpush_btn_selector.xml b/src/android/richpush_btn_selector.xml new file mode 100644 index 0000000..4750de9 --- /dev/null +++ b/src/android/richpush_btn_selector.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + \ No newline at end of file