Skip to content

Commit

Permalink
Merge pull request #84 from JoshLipan/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
JoshLipan authored Nov 12, 2018
2 parents d676134 + 38c1859 commit 0471bc7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
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.5.2",
"version": "3.5.3",
"description": "JMessage Cordova Plugin.",
"cordova": {
"id": "jmessage-phonegap-plugin",
Expand All @@ -24,7 +24,7 @@
],
"devDependencies": {
"cordova-plugin-device": "*",
"cordova-plugin-jcore": ">=1.2.0"
"cordova-plugin-jcore": ">=1.2.5"
},
"author": "JiGuang",
"license": "MIT",
Expand Down
8 changes: 7 additions & 1 deletion 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.5.2">
version="3.5.3">

<name>JMessage</name>
<description>集成极光 IM 和推送功能</description>
Expand Down Expand Up @@ -153,6 +153,12 @@
android:name="cn.jpush.android.service.DataProvider"
android:exported="true" />

<!-- Required since JMessage 2.7.0 SDK 核心功能-->
<provider
android:name="cn.jpush.im.android.helpers.ipc.IMProvider"
android:authorities="$PACKAGE_NAME.IMProvider"
android:exported="false" />

<meta-data android:name="JPUSH_APPKEY" android:value="$APP_KEY"/>
<meta-data android:name="JPUSH_CHANNEL" android:value="developer-default"/>
</config-file>
Expand Down
6 changes: 2 additions & 4 deletions src/android/ChatroomHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
import cn.jpush.im.android.api.model.Conversation;
import cn.jpush.im.api.BasicCallback;

import static cn.jiguang.cordova.im.JMessagePlugin.ERR_CODE_CONVERSATION;
import static cn.jiguang.cordova.im.JMessagePlugin.ERR_CODE_PARAMETER;
import static cn.jiguang.cordova.im.JMessagePlugin.ERR_MSG_CONVERSATION;
import static cn.jiguang.cordova.im.JMessagePlugin.ERR_MSG_PARAMETER;
import static cn.jiguang.cordova.im.JMessageUtils.handleResult;
import static cn.jiguang.cordova.im.JsonUtils.toJson;
Expand Down Expand Up @@ -85,7 +83,7 @@ public void gotResult(int status, String desc, List<ChatRoomInfo> chatRoomInfoLi
}

static void getChatRoomInfoListById(JSONArray data, final CallbackContext callback) {
Set<Long> roomIds = new HashSet<Long>(); // JS 层为了和 iOS 统一,因此 roomId 类型为 String,在原生做转换。
Set<Long> roomIds = new HashSet<Long>(); // JS 层为了和 iOS 统一,因此 roomId 类型为 String,在原生做转换。

try {
JSONObject params = data.getJSONObject(0);
Expand Down Expand Up @@ -201,7 +199,7 @@ static void exitChatRoom(JSONArray data, final CallbackContext callback) {
ChatRoomManager.leaveChatRoom(roomId, new BasicCallback() {
@Override
public void gotResult(int status, String desc) {
if (status == 0) { // success
if (status == 0) { // success
callback.success();
} else {
handleResult(status, desc, callback);
Expand Down
Binary file removed src/android/libs/jmessage-sdk-android-2.6.1.jar
Binary file not shown.
Binary file added src/android/libs/jmessage-sdk-android-2.7.1.jar
Binary file not shown.

0 comments on commit 0471bc7

Please sign in to comment.