Merge branch 'dev'

This commit is contained in:
Hevin 2016-05-13 10:57:56 +08:00
commit 39d65d61c8
10 changed files with 124 additions and 3 deletions

View File

@ -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)

View File

@ -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",

View File

@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cn.jpush.phonegap.JPushPlugin"
version="2.1.6">
version="2.1.7">
<name>JPush Plugin</name>
<description>JPush for cordova plugin</description>
@ -95,6 +95,13 @@
</intent-filter>
</activity>
<!-- Rich push 核心功能 since 2.0.6-->
<activity
android:name="cn.jpush.android.ui.PopWinActivity"
android:theme="@style/MyDialogStyle"
android:exported="false">
</activity>
<!-- Required SDK核心功能-->
<service
android:name="cn.jpush.android.service.DownloadService"
@ -166,6 +173,7 @@
<meta-data android:name="JPUSH_CHANNEL" android:value="developer-default"/>
<meta-data android:name="JPUSH_APPKEY" android:value="$API_KEY"/>
</config-file>
<source-file src="src/android/jpush-android-2.1.3.jar" target-dir="libs"/>
<source-file src="src/android/armeabi/libjpush213.so" target-dir="libs/armeabi"/>
<source-file src="src/android/armeabi-v7a/libjpush213.so" target-dir="libs/armeabi-v7a"/>
@ -177,5 +185,14 @@
<source-file src="src/android/MyReceiver.java" target-dir="src/cn/jpush/phonegap"/>
<source-file src="src/android/test_notification_layout.xml" target-dir="res/layout"/>
<source-file src="src/android/jpush_notification_icon.png" target-dir="res/drawable"/>
<!-- Rich Push resources -->
<source-file src="src/android/ic_richpush_actionbar_back.png" target-dir="res/drawable" />
<source-file src="src/android/ic_richpush_actionbar_divider.png" target-dir="res/drawable" />
<source-file src="src/android/richpush_btn_selector.png" target-dir="res/drawable" />
<source-file src="src/android/jpush_popwin_layout.xml" target-dir="res/layout" />
<source-file src="src/android/jpush_style.xml" target-dir="res/layout" />
<source-file src="src/android/jpush_webview_layout.xml" target-dir="res/layout" />
</platform>
</plugin>

View File

@ -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);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/popLayoutId"
style="@style/MyDialogStyle"
android:orientation="vertical"
android:layout_width="280dp"
android:layout_height="250dp" >
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/wvPopwin"/>
</LinearLayout>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="MyDialogStyle">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
</resources>

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<cn.jpush.android.ui.FullScreenView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/actionbarLayoutId"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/rlRichpushTitleBar"
android:layout_width="match_parent"
android:layout_height="40.0dp"
android:background="#29313a">
<ImageButton
android:id="@+id/imgRichpushBtnBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="9dp"
android:layout_marginRight="10dp"
android:background="@drawable/richpush_btn_selector" />
<ImageView
android:id="@+id/imgView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/imgRichpushBtnBack"
android:clickable="false"
android:src="@drawable/ic_richpush_actionbar_divider" />
<TextView
android:id="@+id/tvRichpushTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="7dp"
android:layout_toRightOf="@id/imgView"
android:clickable="false"
android:text=" "
android:textSize="20sp"
android:textColor="#ffffff" />
</RelativeLayout>
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/fullWebView"
android:background="#000000" />
</cn.jpush.android.ui.FullScreenView>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 获得焦点但未按下时的背景图片 -->
<item
android:state_focused="true"
android:state_enabled="true"
android:state_pressed="false"
android:drawable="@drawable/ic_richpush_actionbar_back" />
<!-- 按下时的背景图片 -->
<item
android:state_enabled="true"
android:state_pressed="true"
android:drawable="@android:color/darker_gray" />
<!-- 按下时的背景图片 -->
<item
android:state_enabled="true"
android:state_checked="true"
android:drawable="@android:color/darker_gray" />
<!-- 默认时的背景图片 -->
<item android:drawable="@drawable/ic_richpush_actionbar_back" />
</selector>