Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Hevin committed Feb 27, 2018
2 parents 8d77bea + a77f083 commit 71fd135
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# JMessage PhoneGap / Cordova Plugin

[![release](https://img.shields.io/badge/release-3.2.0-blue.svg)](https://github.com/jpush/jmessage-phonegap-plugin/releases)
[![release](https://img.shields.io/badge/release-3.4.0-blue.svg)](https://github.com/jpush/jmessage-phonegap-plugin/releases)
[![platforms](https://img.shields.io/badge/platforms-iOS%7CAndroid-green.svg)](https://github.com/jpush/jmessage-phonegap-plugin)
[![Code Triagers Badge](https://www.codetriage.com/jpush/jmessage-phonegap-plugin/badges/users.svg)](https://www.codetriage.com/jpush/jmessage-phonegap-plugin)
[![weibo](https://img.shields.io/badge/weibo-JPush-blue.svg)](http://weibo.com/jpush?refer_flag=1001030101_&is_all=1)
Expand All @@ -9,6 +9,8 @@

若只需要简单的聊天功能,可优先考虑使用 [JMessage Web SDK](https://docs.jiguang.cn/jmessage/client/im_sdk_js_v2/)

注意:从 v3.4.0 开始支持 cordova-android 7.0.0,因 cordova-android 7.0.0 修改了 Android 项目结构,因此不兼容之前的版本,升级前请务必注意。如果需要安装之前版本的插件,请先安装 v1.2.0 以下版本的 cordova-plugin-jcore,再安装插件。

## Full Documentation

完整文档请查阅 [wiki](https://github.com/jpush/jmessage-phonegap-plugin/wiki),包括[安装指南](https://github.com/jpush/jmessage-phonegap-plugin/wiki/Installation-Guide)[API 说明](https://github.com/jpush/jmessage-phonegap-plugin/wiki/APIs)等。
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jmessage-phonegap-plugin",
"version": "3.3.0",
"version": "3.4.0",
"description": "JMessage Cordova Plugin.",
"cordova": {
"id": "jmessage-phonegap-plugin",
Expand All @@ -24,7 +24,7 @@
],
"devDependencies": {
"cordova-plugin-device": "*",
"cordova-plugin-jcore": "*"
"cordova-plugin-jcore": ">=1.2.0"
},
"author": "JiGuang",
"license": "MIT",
Expand Down
16 changes: 8 additions & 8 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="jmessage-phonegap-plugin"
version="3.2.0">
version="3.4.0">

<name>JMessage</name>
<description>集成极光 IM 和推送功能</description>
Expand Down Expand Up @@ -62,7 +62,7 @@
</feature>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest">
<config-file target="AndroidManifest.xml" parent="/manifest" mode="merge">
<!-- Required 一些系统要求的权限,如访问网络等-->
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT"/>
<uses-permission android:name="android.permission.INTERNET"/>
Expand Down Expand Up @@ -92,7 +92,7 @@
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest/application">
<config-file target="AndroidManifest.xml" parent="/manifest/application" mode="merge">
<!-- Required Push SDK核心功能-->
<service
android:name="cn.jpush.android.service.PushService"
Expand Down Expand Up @@ -157,10 +157,10 @@
<meta-data android:name="JPUSH_CHANNEL" android:value="developer-default"/>
</config-file>

<source-file src="src/android/libs/jmessage-android_v2.4.1.jar" target-dir="libs"/>
<source-file src="src/android/JMessagePlugin.java" target-dir="src/cn/jiguang/cordova/im"/>
<source-file src="src/android/JMessageUtils.java" target-dir="src/cn/jiguang/cordova/im"/>
<source-file src="src/android/JsonUtils.java" target-dir="src/cn/jiguang/cordova/im"/>
<source-file src="src/android/ChatRoomHandler.java" target-dir="src/cn/jiguang/cordova/im"/>
<lib-file src="src/android/libs/jmessage-android_v2.4.1.jar" />
<source-file src="src/android/JMessagePlugin.java" target-dir="app/src/main/java/cn/jiguang/cordova/im"/>
<source-file src="src/android/JMessageUtils.java" target-dir="app/src/main/java/cn/jiguang/cordova/im"/>
<source-file src="src/android/JsonUtils.java" target-dir="app/src/main/java/cn/jiguang/cordova/im"/>
<source-file src="src/android/ChatRoomHandler.java" target-dir="app/src/main/java/cn/jiguang/cordova/im"/>
</platform>
</plugin>
1 change: 0 additions & 1 deletion src/android/JsonUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import java.util.Map;

import cn.jpush.im.android.api.JMessageClient;
import cn.jpush.im.android.api.callback.GetUserInfoCallback;
import cn.jpush.im.android.api.content.CustomContent;
import cn.jpush.im.android.api.content.EventNotificationContent;
import cn.jpush.im.android.api.content.FileContent;
Expand Down
5 changes: 2 additions & 3 deletions www/JMessagePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,15 @@ var JMessagePlugin = {
exec(null, null, PLUGIN_NAME, 'userLogout', [])
},
/**
* 设置 JMessage 服务器角标。
* (iOS only)设置 JMessage 服务器角标。
* @param {object} params = {
* badge: number
* }
*/
setBadge: function (params) {
if (device.platform !== 'Android') {
if (device.platform === 'iOS') {
exec(null, null, PLUGIN_NAME, 'setBadge', [params])
}

},
/**
* 登录成功则返回用户信息,未登录则对应用户信息为空对象。
Expand Down

0 comments on commit 71fd135

Please sign in to comment.