Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
feat(release): 5.1.4+1
Browse files Browse the repository at this point in the history
  • Loading branch information
GP-Moon committed Sep 22, 2021
1 parent a42001f commit 5059c14
Show file tree
Hide file tree
Showing 38 changed files with 1,333 additions and 538 deletions.
Binary file modified .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ gradlew.bat
gradle-wrapper.jar
gradle-wrapper.properties
.flutter-plugins-dependencies
.dart_tool
.DS_Store
build/
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 5.1.4+1

**SDK:**
* 1.适配 Android embedding v2
* 2.修复 Android 层调用 SDK 偶尔产生的崩溃异常

**Demo: **
* 1.在 Demo 层注册 LocationMessage


## 5.1.4

**SDK:**
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
flutter:
sdk: flutter
rongcloud_im_plugin: ^5.1.4
rongcloud_im_plugin: ^5.1.4+1
```
2. 在项目路径下,下载插件:
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ rootProject.allprojects {
google()
jcenter()
mavenCentral()
maven {url "https://dl.bintray.com/rongcloud/maven"}
maven {url "http://maven.rongcloud.cn/repository/maven-releases/"}
maven {url 'http://developer.huawei.com/repo/'}
}
Expand All @@ -38,5 +37,6 @@ android {
}

dependencies {
api 'cn.rongcloud.sdk:im_lib:5.1.4.1'
api 'cn.rongcloud.sdk:im_libcore:5.1.4.1'
api 'cn.rongcloud.sdk:im_chatroom:5.1.4.1'
}
10 changes: 5 additions & 5 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.rong.flutter.imlib">
package="io.rong.flutter.imlib">

<application
android:allowBackup="true"
android:supportsRtl="true">

<!--会话界面-->

<!--会话列表界面-->
<meta-data
android:name="rc.imflutter"
android:value="io.rong.flutter.imlib.Version" />
</application>
</manifest>
59 changes: 28 additions & 31 deletions android/src/main/java/io/rong/flutter/imlib/MessageFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import java.util.List;
import java.util.Map;

import io.rong.imlib.location.message.LocationMessage;
import io.rong.imlib.model.ChatRoomInfo;
import io.rong.imlib.model.ChatRoomMemberInfo;
import io.rong.imlib.model.Conversation;
Expand Down Expand Up @@ -72,28 +71,28 @@ public String message2String(Message message) {
MessagePushConfig messagePushConfig = message.getMessagePushConfig();
if (messagePushConfig != null) {
HashMap messagePushConfigMap = new HashMap();
messagePushConfigMap.put("pushTitle",messagePushConfig.getPushTitle());
messagePushConfigMap.put("pushContent",messagePushConfig.getPushContent());
messagePushConfigMap.put("pushData",messagePushConfig.getPushData());
messagePushConfigMap.put("forceShowDetailContent",messagePushConfig.isForceShowDetailContent());
messagePushConfigMap.put("disablePushTitle",messagePushConfig.isDisablePushTitle());
messagePushConfigMap.put("templateId",messagePushConfig.getTemplateId());
if (messagePushConfig.getAndroidConfig() != null){
messagePushConfigMap.put("pushTitle", messagePushConfig.getPushTitle());
messagePushConfigMap.put("pushContent", messagePushConfig.getPushContent());
messagePushConfigMap.put("pushData", messagePushConfig.getPushData());
messagePushConfigMap.put("forceShowDetailContent", messagePushConfig.isForceShowDetailContent());
messagePushConfigMap.put("disablePushTitle", messagePushConfig.isDisablePushTitle());
messagePushConfigMap.put("templateId", messagePushConfig.getTemplateId());
if (messagePushConfig.getAndroidConfig() != null) {
HashMap androidConfigMap = new HashMap();
androidConfigMap.put("notificationId",messagePushConfig.getAndroidConfig().getNotificationId());
androidConfigMap.put("channelIdMi",messagePushConfig.getAndroidConfig().getChannelIdMi());
androidConfigMap.put("channelIdHW",messagePushConfig.getAndroidConfig().getChannelIdHW());
androidConfigMap.put("channelIdOPPO",messagePushConfig.getAndroidConfig().getChannelIdOPPO());
androidConfigMap.put("typeVivo",messagePushConfig.getAndroidConfig().getTypeVivo());
messagePushConfigMap.put("androidConfig",androidConfigMap);
androidConfigMap.put("notificationId", messagePushConfig.getAndroidConfig().getNotificationId());
androidConfigMap.put("channelIdMi", messagePushConfig.getAndroidConfig().getChannelIdMi());
androidConfigMap.put("channelIdHW", messagePushConfig.getAndroidConfig().getChannelIdHW());
androidConfigMap.put("channelIdOPPO", messagePushConfig.getAndroidConfig().getChannelIdOPPO());
androidConfigMap.put("typeVivo", messagePushConfig.getAndroidConfig().getTypeVivo());
messagePushConfigMap.put("androidConfig", androidConfigMap);
}
if (messagePushConfig.getIOSConfig() != null){
if (messagePushConfig.getIOSConfig() != null) {
HashMap iosConfigMap = new HashMap();
iosConfigMap.put("thread_id",messagePushConfig.getIOSConfig().getThread_id());
iosConfigMap.put("apns_collapse_id",messagePushConfig.getIOSConfig().getApns_collapse_id());
messagePushConfigMap.put("iOSConfig",iosConfigMap);
iosConfigMap.put("thread_id", messagePushConfig.getIOSConfig().getThread_id());
iosConfigMap.put("apns_collapse_id", messagePushConfig.getIOSConfig().getApns_collapse_id());
messagePushConfigMap.put("iOSConfig", iosConfigMap);
}
map.put("messagePushConfig",messagePushConfigMap);
map.put("messagePushConfig", messagePushConfigMap);
}
map.put("sentTime", message.getSentTime());
map.put("objectName", message.getObjectName());
Expand All @@ -113,8 +112,6 @@ public String message2String(Message message) {
RCMessageHandler.encodeSightMessage(message);
} else if (message.getContent() instanceof GIFMessage) {
RCMessageHandler.encodeGifMessage(message);
} else if (message.getContent() instanceof LocationMessage) {
RCMessageHandler.encodeLocationMessage(message);
} else if (message.getContent() instanceof ReferenceMessage) {
// 引用消息的引用内容的类型需要判断
RCMessageHandler.encodeReferenceMessage(message);
Expand Down Expand Up @@ -171,8 +168,8 @@ public String conversation2String(Conversation conversation) {
map.put("latestMessageId", conversation.getLatestMessageId());
map.put("mentionedCount", conversation.getMentionedCount());
map.put("draft", conversation.getDraft());
if (conversation.getNotificationStatus()!= null){
map.put("blockStatus",conversation.getNotificationStatus().getValue());
if (conversation.getNotificationStatus() != null) {
map.put("blockStatus", conversation.getNotificationStatus().getValue());
}
map.put("receivedTime", conversation.getReceivedTime());

Expand All @@ -194,8 +191,8 @@ public String conversation2String(Conversation conversation) {
return jStr;
}

public String conversationTagInfo2String(ConversationTagInfo conversationTagInfo){
if (conversationTagInfo == null){
public String conversationTagInfo2String(ConversationTagInfo conversationTagInfo) {
if (conversationTagInfo == null) {
return "";
}
Map map = new HashMap();
Expand All @@ -207,15 +204,15 @@ public String conversationTagInfo2String(ConversationTagInfo conversationTagInfo
return jStr;
}

public String tagInfo2String(TagInfo tagInfo){
if (tagInfo == null){
public String tagInfo2String(TagInfo tagInfo) {
if (tagInfo == null) {
return "";
}
Map map = new HashMap();
map.put("tagId",tagInfo.getTagId());
map.put("tagName",tagInfo.getTagName());
map.put("count",tagInfo.getCount());
map.put("timestamp",tagInfo.getTimestamp());
map.put("tagId", tagInfo.getTagId());
map.put("tagName", tagInfo.getTagName());
map.put("count", tagInfo.getCount());
map.put("timestamp", tagInfo.getTimestamp());

JSONObject jObj = new JSONObject(map);

Expand Down
Loading

0 comments on commit 5059c14

Please sign in to comment.