Update SDK to 1.1.5 </br>
Fix android message error bug
This commit is contained in:
parent
0107919f97
commit
40190198d8
@ -1,3 +1,8 @@
|
|||||||
|
## 1.0.3
|
||||||
|
|
||||||
|
Fix android message error bug </br>
|
||||||
|
Update SDK to 1.1.5 </br>
|
||||||
|
|
||||||
## 1.0.2
|
## 1.0.2
|
||||||
|
|
||||||
Upgrade sdk </br>
|
Upgrade sdk </br>
|
||||||
|
@ -14,7 +14,7 @@ A flutter IM plugin for android and ios.
|
|||||||
|
|
||||||
#### 1,Add dependency in yaml
|
#### 1,Add dependency in yaml
|
||||||
|
|
||||||
flutter_openim_sdk: ^1.0.2
|
flutter_openim_sdk: ^1.0.3
|
||||||
|
|
||||||
#### 2,Import package
|
#### 2,Import package
|
||||||
|
|
||||||
|
@ -51,5 +51,5 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'io.openim:client-sdk:1.1.4@aar'
|
implementation 'io.openim:client-sdk:1.1.5@aar'
|
||||||
}
|
}
|
@ -1,32 +1,41 @@
|
|||||||
package io.openim.flutter_openim_sdk.listener;
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import android.util.ArrayMap;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||||
import open_im_sdk.OnAdvancedMsgListener;
|
import open_im_sdk.OnAdvancedMsgListener;
|
||||||
|
|
||||||
public class AdvancedMsgListener implements OnAdvancedMsgListener {
|
public class AdvancedMsgListener implements OnAdvancedMsgListener {
|
||||||
final Map<String, String> values = new HashMap<>();
|
// final Map<String, String> values = new HashMap<>();
|
||||||
|
private final String id;
|
||||||
|
|
||||||
public AdvancedMsgListener(String listenerId) {
|
public AdvancedMsgListener(String listenerId) {
|
||||||
this.values.put("id", listenerId);
|
this.id = listenerId;
|
||||||
|
// this.values.put("id", listenerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRecvC2CReadReceipt(String s) {
|
public void onRecvC2CReadReceipt(String s) {
|
||||||
|
final Map<String, String> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
values.put("haveReadMessage", s);
|
values.put("haveReadMessage", s);
|
||||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvC2CReadReceipt", values);
|
CommonUtil.emitEvent("advancedMsgListener", "onRecvC2CReadReceipt", values);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRecvMessageRevoked(String s) {
|
public void onRecvMessageRevoked(String s) {
|
||||||
|
final Map<String, String> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
values.put("revokedMessage", s);
|
values.put("revokedMessage", s);
|
||||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvMessageRevoked", values);
|
CommonUtil.emitEvent("advancedMsgListener", "onRecvMessageRevoked", values);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRecvNewMessage(String s) {
|
public void onRecvNewMessage(String s) {
|
||||||
|
final Map<String, String> values = new ArrayMap<>();
|
||||||
|
values.put("id", id);
|
||||||
values.put("newMessage", s);
|
values.put("newMessage", s);
|
||||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvNewMessage", values);
|
CommonUtil.emitEvent("advancedMsgListener", "onRecvNewMessage", values);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package io.openim.flutter_openim_sdk.listener;
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
|
import android.util.ArrayMap;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -9,7 +11,7 @@ import open_im_sdk.OnGroupListener;
|
|||||||
public class GroupListener implements OnGroupListener {
|
public class GroupListener implements OnGroupListener {
|
||||||
@Override
|
@Override
|
||||||
public void onApplicationProcessed(String s, String s1, int i, String s2) {
|
public void onApplicationProcessed(String s, String s1, int i, String s2) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new ArrayMap<>();
|
||||||
map.put("groupId", s);
|
map.put("groupId", s);
|
||||||
map.put("opUser", s1);
|
map.put("opUser", s1);
|
||||||
map.put("agreeOrReject", i);
|
map.put("agreeOrReject", i);
|
||||||
@ -19,14 +21,14 @@ public class GroupListener implements OnGroupListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onGroupCreated(String s) {
|
public void onGroupCreated(String s) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new ArrayMap<>();
|
||||||
map.put("groupId", s);
|
map.put("groupId", s);
|
||||||
CommonUtil.emitEvent("groupListener", "onGroupCreated", map);
|
CommonUtil.emitEvent("groupListener", "onGroupCreated", map);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onGroupInfoChanged(String s, String s1) {
|
public void onGroupInfoChanged(String s, String s1) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new ArrayMap<>();
|
||||||
map.put("groupId", s);
|
map.put("groupId", s);
|
||||||
map.put("groupInfo", s1);
|
map.put("groupInfo", s1);
|
||||||
CommonUtil.emitEvent("groupListener", "onGroupInfoChanged", map);
|
CommonUtil.emitEvent("groupListener", "onGroupInfoChanged", map);
|
||||||
@ -34,7 +36,7 @@ public class GroupListener implements OnGroupListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMemberEnter(String s, String s1) {
|
public void onMemberEnter(String s, String s1) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new ArrayMap<>();
|
||||||
map.put("groupId", s);
|
map.put("groupId", s);
|
||||||
map.put("memberList", s1);
|
map.put("memberList", s1);
|
||||||
CommonUtil.emitEvent("groupListener", "onMemberEnter", map);
|
CommonUtil.emitEvent("groupListener", "onMemberEnter", map);
|
||||||
@ -42,7 +44,7 @@ public class GroupListener implements OnGroupListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMemberInvited(String s, String s1, String s2) {
|
public void onMemberInvited(String s, String s1, String s2) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new ArrayMap<>();
|
||||||
map.put("groupId", s);
|
map.put("groupId", s);
|
||||||
map.put("opUser", s1);
|
map.put("opUser", s1);
|
||||||
map.put("memberList", s2);
|
map.put("memberList", s2);
|
||||||
@ -51,7 +53,7 @@ public class GroupListener implements OnGroupListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMemberKicked(String s, String s1, String s2) {
|
public void onMemberKicked(String s, String s1, String s2) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new ArrayMap<>();
|
||||||
map.put("groupId", s);
|
map.put("groupId", s);
|
||||||
map.put("opUser", s1);
|
map.put("opUser", s1);
|
||||||
map.put("memberList", s2);
|
map.put("memberList", s2);
|
||||||
@ -60,7 +62,7 @@ public class GroupListener implements OnGroupListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMemberLeave(String s, String s1) {
|
public void onMemberLeave(String s, String s1) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new ArrayMap<>();
|
||||||
map.put("groupId", s);
|
map.put("groupId", s);
|
||||||
map.put("member", s1);
|
map.put("member", s1);
|
||||||
CommonUtil.emitEvent("groupListener", "onMemberLeave", map);
|
CommonUtil.emitEvent("groupListener", "onMemberLeave", map);
|
||||||
@ -68,7 +70,7 @@ public class GroupListener implements OnGroupListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onReceiveJoinApplication(String s, String s1, String s2) {
|
public void onReceiveJoinApplication(String s, String s1, String s2) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new ArrayMap<>();
|
||||||
map.put("groupId", s);
|
map.put("groupId", s);
|
||||||
map.put("member", s1);
|
map.put("member", s1);
|
||||||
map.put("opReason", s2);
|
map.put("opReason", s2);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package io.openim.flutter_openim_sdk.listener;
|
package io.openim.flutter_openim_sdk.listener;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import android.util.ArrayMap;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import io.flutter.plugin.common.MethodCall;
|
import io.flutter.plugin.common.MethodCall;
|
||||||
@ -11,7 +12,6 @@ import open_im_sdk.SendMsgCallBack;
|
|||||||
public class MsgSendProgressListener implements SendMsgCallBack {
|
public class MsgSendProgressListener implements SendMsgCallBack {
|
||||||
final private MethodChannel.Result result;
|
final private MethodChannel.Result result;
|
||||||
final private MethodCall call;
|
final private MethodCall call;
|
||||||
final Map<String, Object> values = new HashMap<>();
|
|
||||||
|
|
||||||
public MsgSendProgressListener(MethodChannel.Result result, MethodCall call) {
|
public MsgSendProgressListener(MethodChannel.Result result, MethodCall call) {
|
||||||
this.result = result;
|
this.result = result;
|
||||||
@ -25,6 +25,7 @@ public class MsgSendProgressListener implements SendMsgCallBack {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onProgress(long l) {
|
public void onProgress(long l) {
|
||||||
|
final Map<String, Object> values = new ArrayMap<>();
|
||||||
values.put("clientMsgID", CommonUtil.getSendMessageClientMsgID(call));
|
values.put("clientMsgID", CommonUtil.getSendMessageClientMsgID(call));
|
||||||
values.put("progress", l);
|
values.put("progress", l);
|
||||||
CommonUtil.emitEvent("msgSendProgressListener", "onProgress", values);
|
CommonUtil.emitEvent("msgSendProgressListener", "onProgress", values);
|
||||||
|
@ -3,7 +3,8 @@ package io.openim.flutter_openim_sdk.util;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import androidx.collection.ArrayMap;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import io.flutter.Log;
|
import io.flutter.Log;
|
||||||
@ -46,7 +47,7 @@ public class CommonUtil {
|
|||||||
|
|
||||||
public synchronized static <T> void emitEvent(String method, String type, Long errCode, String errMsg, T data) {
|
public synchronized static <T> void emitEvent(String method, String type, Long errCode, String errMsg, T data) {
|
||||||
runMainThread(() -> {
|
runMainThread(() -> {
|
||||||
HashMap<String, Object> res = new HashMap<>();
|
Map<String, Object> res = new ArrayMap<>();
|
||||||
if (null != type) {
|
if (null != type) {
|
||||||
res.put("type", type);
|
res.put("type", type);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: flutter_openim_sdk
|
name: flutter_openim_sdk
|
||||||
description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source.
|
description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source.
|
||||||
version: 1.0.2
|
version: 1.0.3
|
||||||
homepage: https://www.rentsoft.cn
|
homepage: https://www.rentsoft.cn
|
||||||
repository: https://github.com/OpenIMSDK/Open-IM-SDK-Flutter
|
repository: https://github.com/OpenIMSDK/Open-IM-SDK-Flutter
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user