From cf538a5c794366b7dd9e1f16bacc2b0b864f8479 Mon Sep 17 00:00:00 2001 From: dujiepeng <347302029@qq.com> Date: Sun, 5 Dec 2021 19:31:28 +0800 Subject: [PATCH 1/3] update version to 2.2.0 --- ChatSDKDemo/Assets/ChatSDK/ChatSDK/SDKClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/SDKClient.cs b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/SDKClient.cs index ad0039fc..f66e9ad6 100644 --- a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/SDKClient.cs +++ b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/SDKClient.cs @@ -61,7 +61,7 @@ public static SDKClient Instance /// /// 获取sdk版本号 /// - public string SdkVersion { get => "2.1.0"; } + public string SdkVersion { get => "2.2.0"; } /// /// 获取当前登录的环信id From 05f94ff448ab4afbb0c1162db83ebf5e66958983 Mon Sep 17 00:00:00 2001 From: dujiepeng <347302029@qq.com> Date: Fri, 17 Dec 2021 18:50:23 +0800 Subject: [PATCH 2/3] fix il2cpp android error. --- .../ChatSDK/ChatManager/ChatManager_iOS.cs | 45 ++++----- .../ChatSDK/ChatSDK/Client/Client_iOS.cs | 25 ++--- .../ContactManager/ContactManager_iOS.cs | 28 ++---- .../ConversationManager_iOS.cs | 43 ++++---- .../ChatSDK/GroupManager/GroupManager_iOS.cs | 95 ++++++++---------- .../ChatSDK/PushManager/PushManager_iOS.cs | 24 ++--- .../ChatSDK/RoomManager/RoomManager_iOS.cs | 52 ++++------ .../UserInfoManager/UserInfoManager_iOS.cs | 14 +-- .../ChatSDK/ChatSDK/native/ChatAPIIOS.cs | 71 +++++++++++++ .../Plugins/Android/libs/unity_chat_sdk.jar | Bin 106397 -> 106433 bytes .../helper/EMMessageBodyHelper.java | 13 ++- 11 files changed, 208 insertions(+), 202 deletions(-) create mode 100644 ChatSDKDemo/Assets/ChatSDK/ChatSDK/native/ChatAPIIOS.cs diff --git a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/ChatManager/ChatManager_iOS.cs b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/ChatManager/ChatManager_iOS.cs index b1047207..38f8f5fb 100644 --- a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/ChatManager/ChatManager_iOS.cs +++ b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/ChatManager/ChatManager_iOS.cs @@ -17,7 +17,7 @@ public override bool DeleteConversation(string conversationId, bool deleteMessag JSONObject obj = new JSONObject(); obj.Add("convId", conversationId); obj.Add("deleteMessages", deleteMessages); - string ret = ChatManagerNative.ChatManager_GetMethodCall("deleteConversation", obj.ToString()); + string ret = ChatAPIIOS.ChatManager_GetMethodCall("deleteConversation", obj.ToString()); JSONNode jn = JSON.Parse(ret); return jn["ret"].AsBool; } @@ -26,14 +26,14 @@ public override void DownloadAttachment(string messageId, CallBack handle = null { JSONObject obj = new JSONObject(); obj.Add("msgId", messageId); - ChatManagerNative.ChatManager_HandleMethodCall("downloadAttachment", obj.ToString(), handle?.callbackId); + ChatAPIIOS.ChatManager_HandleMethodCall("downloadAttachment", obj.ToString(), handle?.callbackId); } public override void DownloadThumbnail(string messageId, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("msgId", messageId); - ChatManagerNative.ChatManager_HandleMethodCall("downloadThumbnail", obj.ToString(), handle?.callbackId); + ChatAPIIOS.ChatManager_HandleMethodCall("downloadThumbnail", obj.ToString(), handle?.callbackId); } public override void FetchHistoryMessagesFromServer(string conversationId, ConversationType type, string startMessageId = null, int count = 20, ValueCallBack> handle = null) @@ -44,7 +44,7 @@ public override void FetchHistoryMessagesFromServer(string conversationId, Conve obj.Add("startMsgId", startMessageId ?? ""); obj.Add("count", count); string jsonString = obj.ToString(); - ChatManagerNative.ChatManager_HandleMethodCall("fetchHistoryMessages", jsonString, handle?.callbackId); + ChatAPIIOS.ChatManager_HandleMethodCall("fetchHistoryMessages", jsonString, handle?.callbackId); } public override Conversation GetConversation(string conversationId, ConversationType type, bool createIfNeed = true) @@ -53,7 +53,7 @@ public override Conversation GetConversation(string conversationId, Conversation obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(type)); obj.Add("createIfNeed", createIfNeed); - string jsonString = ChatManagerNative.ChatManager_GetMethodCall("getConversation", obj.ToString()); + string jsonString = ChatAPIIOS.ChatManager_GetMethodCall("getConversation", obj.ToString()); if (jsonString == null || jsonString.Length == 0) { return null; @@ -63,12 +63,12 @@ public override Conversation GetConversation(string conversationId, Conversation public override void GetConversationsFromServer(ValueCallBack> handle = null) { - ChatManagerNative.ChatManager_HandleMethodCall("getConversationsFromServer", null, handle?.callbackId); + ChatAPIIOS.ChatManager_HandleMethodCall("getConversationsFromServer", null, handle?.callbackId); } public override int GetUnreadMessageCount() { - string jsonString = ChatManagerNative.ChatManager_GetMethodCall("getUnreadMessageCount"); + string jsonString = ChatAPIIOS.ChatManager_GetMethodCall("getUnreadMessageCount"); if (jsonString == null || jsonString.Length == 0) { return 0; } @@ -81,7 +81,7 @@ public override bool ImportMessages(List messages) { JSONObject obj = new JSONObject(); obj.Add("list", TransformTool.JsonObjectFromMessageList(messages)); - string jsonString = ChatManagerNative.ChatManager_GetMethodCall("importMessages", obj.ToString()); + string jsonString = ChatAPIIOS.ChatManager_GetMethodCall("importMessages", obj.ToString()); if (jsonString == null || jsonString.Length == 0) { return false; } @@ -91,7 +91,7 @@ public override bool ImportMessages(List messages) public override List LoadAllConversations() { - string jsonString = ChatManagerNative.ChatManager_GetMethodCall("loadAllConversations"); + string jsonString = ChatAPIIOS.ChatManager_GetMethodCall("loadAllConversations"); if (jsonString == null || jsonString.Length == 0) { return null; } @@ -102,7 +102,7 @@ public override Message LoadMessage(string messageId) { JSONObject obj = new JSONObject(); obj.Add("msgId", messageId); - string jsonString = ChatManagerNative.ChatManager_GetMethodCall("getMessage", obj.ToString()); + string jsonString = ChatAPIIOS.ChatManager_GetMethodCall("getMessage", obj.ToString()); if (jsonString == null || jsonString.Length == 0) { return null; @@ -113,7 +113,7 @@ public override Message LoadMessage(string messageId) public override bool MarkAllConversationsAsRead() { JSONObject obj = new JSONObject(); - string jsonString = ChatManagerNative.ChatManager_GetMethodCall("markAllChatMsgAsRead", obj.ToString()); + string jsonString = ChatAPIIOS.ChatManager_GetMethodCall("markAllChatMsgAsRead", obj.ToString()); if (jsonString == null || jsonString.Length == 0) { return false; @@ -126,14 +126,14 @@ public override void RecallMessage(string messageId, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("msgId", messageId); - ChatManagerNative.ChatManager_HandleMethodCall("recallMessage", obj.ToString(), handle?.callbackId); + ChatAPIIOS.ChatManager_HandleMethodCall("recallMessage", obj.ToString(), handle?.callbackId); } public override Message ResendMessage(string messageId, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("msgId", messageId); - string jsonString = ChatManagerNative.ChatManager_GetMethodCall("resendMessage", obj.ToString(), handle?.callbackId); + string jsonString = ChatAPIIOS.ChatManager_GetMethodCall("resendMessage", obj.ToString(), handle?.callbackId); if (jsonString == null || jsonString.Length == 0) { return null; @@ -149,7 +149,7 @@ public override List SearchMsgFromDB(string keywords, long timestamp = obj.Add("count", maxCount); obj.Add("timestamp", timestamp); obj.Add("direction", direction == MessageSearchDirection.UP ? "up" : "down"); - string jsonString = ChatManagerNative.ChatManager_GetMethodCall("searchChatMsgFromDB", obj.ToString()); + string jsonString = ChatAPIIOS.ChatManager_GetMethodCall("searchChatMsgFromDB", obj.ToString()); return TransformTool.JsonStringToMessageList(jsonString); } @@ -157,26 +157,26 @@ public override void SendConversationReadAck(string conversationId, CallBack han { JSONObject obj = new JSONObject(); obj.Add("convId", conversationId); - ChatManagerNative.ChatManager_HandleMethodCall("ackConversationRead", obj.ToString(), handle?.callbackId); + ChatAPIIOS.ChatManager_HandleMethodCall("ackConversationRead", obj.ToString(), handle?.callbackId); } public override void SendMessage(ref Message message, CallBack handle = null) { CallbackManager.Instance().tempMsgDict.Add(message.LocalTime.ToString(), message); - ChatManagerNative.ChatManager_GetMethodCall("sendMessage", message.ToJson().ToString(), handle?.callbackId); + ChatAPIIOS.ChatManager_GetMethodCall("sendMessage", message.ToJson().ToString(), handle?.callbackId); } public override void SendMessageReadAck(string messageId, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("msgId", messageId); - ChatManagerNative.ChatManager_GetMethodCall("ackMessageRead", obj.ToString(), handle?.callbackId); + ChatAPIIOS.ChatManager_GetMethodCall("ackMessageRead", obj.ToString(), handle?.callbackId); } public override bool UpdateMessage(Message message) { - string jsonString = ChatManagerNative.ChatManager_GetMethodCall("updateChatMessage", message.ToJson().ToString()); + string jsonString = ChatAPIIOS.ChatManager_GetMethodCall("updateChatMessage", message.ToJson().ToString()); if (jsonString == null || jsonString.Length == 0) { return false; } @@ -184,13 +184,4 @@ public override bool UpdateMessage(Message message) return jsonObject["isLoggedIn"].AsBool; } } - - class ChatManagerNative - { - [DllImport("__Internal")] - internal extern static void ChatManager_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); - - [DllImport("__Internal")] - internal extern static string ChatManager_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); - } } \ No newline at end of file diff --git a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/Client/Client_iOS.cs b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/Client/Client_iOS.cs index c9a2bf09..98254fea 100644 --- a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/Client/Client_iOS.cs +++ b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/Client/Client_iOS.cs @@ -10,7 +10,7 @@ internal sealed class Client_iOS : IClient { public override void InitWithOptions(Options options) { - ClientNative.Client_HandleMethodCall("initWithOptions", options.ToJsonString(), null); + ChatAPIIOS.Client_HandleMethodCall("initWithOptions", options.ToJsonString(), null); } public override void CreateAccount(string username, string password, CallBack callBack = null) @@ -18,7 +18,7 @@ public override void CreateAccount(string username, string password, CallBack ca JSONObject obj = new JSONObject(); obj.Add("username", username); obj.Add("password", password); - ClientNative.Client_HandleMethodCall("createAccount", obj.ToString(), callBack?.callbackId); + ChatAPIIOS.Client_HandleMethodCall("createAccount", obj.ToString(), callBack?.callbackId); } public override void Login(string username, string pwdOrToken, bool isToken = false, CallBack callBack = null) @@ -27,25 +27,25 @@ public override void Login(string username, string pwdOrToken, bool isToken = fa obj.Add("username", username); obj.Add("pwdOrToken", pwdOrToken); obj.Add("isToken", isToken); - ClientNative.Client_HandleMethodCall("login", obj.ToString(), callBack?.callbackId); + ChatAPIIOS.Client_HandleMethodCall("login", obj.ToString(), callBack?.callbackId); } public override void Logout(bool unbindDeviceToken, CallBack callBack = null) { JSONObject obj = new JSONObject(); obj.Add("unbindDeviceToken", unbindDeviceToken); - ClientNative.Client_HandleMethodCall("logout", obj.ToString(), callBack?.callbackId); + ChatAPIIOS.Client_HandleMethodCall("logout", obj.ToString(), callBack?.callbackId); } public override string CurrentUsername() { - string jsonString = ClientNative.Client_GetMethodCall("getCurrentUsername"); + string jsonString = ChatAPIIOS.Client_GetMethodCall("getCurrentUsername"); JSONObject jo = JSON.Parse(jsonString).AsObject; return jo["getCurrentUsername"].Value; } public override bool IsConnected { get { - string jsonString = ClientNative.Client_GetMethodCall("isConnected"); + string jsonString = ChatAPIIOS.Client_GetMethodCall("isConnected"); JSONObject jsonObject = JSON.Parse(jsonString).AsObject; return jsonObject["isConnected"].AsBool; } @@ -54,14 +54,14 @@ public override bool IsConnected { } public override bool IsLoggedIn() { - string jsonString = ClientNative.Client_GetMethodCall("isLoggedIn"); + string jsonString = ChatAPIIOS.Client_GetMethodCall("isLoggedIn"); JSONObject jsonObject = JSON.Parse(jsonString).AsObject; return jsonObject["isLoggedIn"].AsBool; } public override string AccessToken() { - string jsonString = ClientNative.Client_GetMethodCall("accessToken"); + string jsonString = ChatAPIIOS.Client_GetMethodCall("accessToken"); JSONObject jo = JSON.Parse(jsonString).AsObject; return jo["accessToken"].Value; } @@ -82,15 +82,6 @@ public override void ClearResource() } } - - class ClientNative - { - [DllImport("__Internal")] - internal extern static void Client_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); - - [DllImport("__Internal")] - internal extern static string Client_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); - } } diff --git a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/ContactManager/ContactManager_iOS.cs b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/ContactManager/ContactManager_iOS.cs index 94272301..ff78feb9 100644 --- a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/ContactManager/ContactManager_iOS.cs +++ b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/ContactManager/ContactManager_iOS.cs @@ -16,7 +16,7 @@ public override void AcceptInvitation(string username, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("username", username); - ContactManagerNative.ContactManager_HandleMethodCall("acceptInvitation", obj.ToString(), handle?.callbackId); + ChatAPIIOS.ContactManager_HandleMethodCall("acceptInvitation", obj.ToString(), handle?.callbackId); } public override void AddContact(string username, string reason = null, CallBack handle = null) @@ -24,21 +24,21 @@ public override void AddContact(string username, string reason = null, CallBack JSONObject obj = new JSONObject(); obj.Add("username", username); obj.Add("reason", reason ?? ""); - ContactManagerNative.ContactManager_HandleMethodCall("addContact", obj.ToString(), handle?.callbackId); + ChatAPIIOS.ContactManager_HandleMethodCall("addContact", obj.ToString(), handle?.callbackId); } public override void AddUserToBlockList(string username, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("username", username); - ContactManagerNative.ContactManager_HandleMethodCall("addUserToBlockList", obj.ToString(), handle?.callbackId); + ChatAPIIOS.ContactManager_HandleMethodCall("addUserToBlockList", obj.ToString(), handle?.callbackId); } public override void DeclineInvitation(string username, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("username", username); - ContactManagerNative.ContactManager_HandleMethodCall("declineInvitation", obj.ToString(), handle?.callbackId); + ChatAPIIOS.ContactManager_HandleMethodCall("declineInvitation", obj.ToString(), handle?.callbackId); } public override void DeleteContact(string username, bool keepConversation = false, CallBack handle = null) @@ -46,12 +46,12 @@ public override void DeleteContact(string username, bool keepConversation = fals JSONObject obj = new JSONObject(); obj.Add("username", username); obj.Add("keepConversation", keepConversation); - ContactManagerNative.ContactManager_HandleMethodCall("deleteContact", obj.ToString(), handle?.callbackId); + ChatAPIIOS.ContactManager_HandleMethodCall("deleteContact", obj.ToString(), handle?.callbackId); } public override List GetAllContactsFromDB() { - string jsonString = ContactManagerNative.ContactManager_GetMethodCall("getAllContactsFromDB"); + string jsonString = ChatAPIIOS.ContactManager_GetMethodCall("getAllContactsFromDB"); if (jsonString == null || jsonString.Length == 0) { return null; @@ -61,33 +61,25 @@ public override List GetAllContactsFromDB() public override void GetAllContactsFromServer(ValueCallBack> handle = null) { - ContactManagerNative.ContactManager_HandleMethodCall("getAllContactsFromServer", null, handle?.callbackId); + ChatAPIIOS.ContactManager_HandleMethodCall("getAllContactsFromServer", null, handle?.callbackId); } public override void GetBlockListFromServer(ValueCallBack> handle = null) { - ContactManagerNative.ContactManager_HandleMethodCall("getBlockListFromServer", null, handle?.callbackId); + ChatAPIIOS.ContactManager_HandleMethodCall("getBlockListFromServer", null, handle?.callbackId); } public override void GetSelfIdsOnOtherPlatform(ValueCallBack> handle = null) { - ContactManagerNative.ContactManager_HandleMethodCall("getSelfIdsOnOtherPlatform", null, handle?.callbackId); + ChatAPIIOS.ContactManager_HandleMethodCall("getSelfIdsOnOtherPlatform", null, handle?.callbackId); } public override void RemoveUserFromBlockList(string username, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("username", username); - ContactManagerNative.ContactManager_HandleMethodCall("removeUserFromBlockList", obj.ToString(), handle?.callbackId); + ChatAPIIOS.ContactManager_HandleMethodCall("removeUserFromBlockList", obj.ToString(), handle?.callbackId); } } - class ContactManagerNative - { - [DllImport("__Internal")] - internal extern static void ContactManager_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); - - [DllImport("__Internal")] - internal extern static string ContactManager_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); - } } \ No newline at end of file diff --git a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/ConversationManager/ConversationManager_iOS.cs b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/ConversationManager/ConversationManager_iOS.cs index 4e858d69..f2520302 100644 --- a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/ConversationManager/ConversationManager_iOS.cs +++ b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/ConversationManager/ConversationManager_iOS.cs @@ -13,7 +13,7 @@ public override bool AppendMessage(string conversationId, ConversationType conve obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(conversationType)); obj.Add("msg", message.ToJson()); - string ret = ConversationNative.Conversation_GetMethodCall("appendMessage", obj.ToString()); + string ret = ChatAPIIOS.Conversation_GetMethodCall("appendMessage", obj.ToString()); JSONNode jn = JSON.Parse(ret); return jn["ret"].AsBool; } @@ -23,7 +23,7 @@ public override bool DeleteAllMessages(string conversationId, ConversationType c JSONObject obj = new JSONObject(); obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(conversationType)); - string ret = ConversationNative.Conversation_GetMethodCall("clearAllMessages", obj.ToString()); + string ret = ChatAPIIOS.Conversation_GetMethodCall("clearAllMessages", obj.ToString()); JSONNode jn = JSON.Parse(ret); return jn["ret"].AsBool; } @@ -34,7 +34,7 @@ public override bool DeleteMessage(string conversationId, ConversationType conve obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(conversationType)); obj.Add("msgId", messageId); - string ret = ConversationNative.Conversation_GetMethodCall("removeMessage", obj.ToString()); + string ret = ChatAPIIOS.Conversation_GetMethodCall("removeMessage", obj.ToString()); JSONNode jn = JSON.Parse(ret); return jn["ret"].AsBool; } @@ -44,7 +44,7 @@ public override Dictionary GetExt(string conversationId, Convers JSONObject obj = new JSONObject(); obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(conversationType)); - string ret = ConversationNative.Conversation_GetMethodCall("conversationExt", obj.ToString()); + string ret = ChatAPIIOS.Conversation_GetMethodCall("conversationExt", obj.ToString()); return TransformTool.JsonStringToDictionary(ret); } @@ -54,7 +54,7 @@ public override bool InsertMessage(string conversationId, ConversationType conve obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(conversationType)); obj.Add("msg", message.ToJson().ToString()); - string ret = ConversationNative.Conversation_GetMethodCall("insertMessage", obj.ToString()); + string ret = ChatAPIIOS.Conversation_GetMethodCall("insertMessage", obj.ToString()); JSONNode jn = JSON.Parse(ret); return jn["ret"].AsBool; } @@ -64,7 +64,7 @@ public override Message LastMessage(string conversationId, ConversationType conv JSONObject obj = new JSONObject(); obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(conversationType)); - string ret = ConversationNative.Conversation_GetMethodCall("getLatestMessage", obj.ToString()); + string ret = ChatAPIIOS.Conversation_GetMethodCall("getLatestMessage", obj.ToString()); return new Message(ret); } @@ -73,7 +73,7 @@ public override Message LastReceivedMessage(string conversationId, ConversationT JSONObject obj = new JSONObject(); obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(conversationType)); - string ret = ConversationNative.Conversation_GetMethodCall("getLatestMessageFromOthers", obj.ToString()); + string ret = ChatAPIIOS.Conversation_GetMethodCall("getLatestMessageFromOthers", obj.ToString()); return new Message(ret); } @@ -83,7 +83,7 @@ public override Message LoadMessage(string conversationId, ConversationType conv obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(conversationType)); obj.Add("msgId", messageId); - string ret = ConversationNative.Conversation_GetMethodCall("loadMsgWithId", obj.ToString()); + string ret = ChatAPIIOS.Conversation_GetMethodCall("loadMsgWithId", obj.ToString()); return new Message(ret); } @@ -95,7 +95,7 @@ public override void LoadMessages(string conversationId, ConversationType conver obj.Add("startId", startMessageId ?? ""); obj.Add("count", count); obj.Add("direction", direction == MessageSearchDirection.UP ? "up" : "down"); - ConversationNative.Conversation_HandleMethodCall("loadMsgWithStartId", obj.ToString(), callback?.callbackId); + ChatAPIIOS.Conversation_HandleMethodCall("loadMsgWithStartId", obj.ToString(), callback?.callbackId); } @@ -109,7 +109,7 @@ public override void LoadMessagesWithKeyword(string conversationId, Conversation obj.Add("count", count); obj.Add("timestamp", timestamp); obj.Add("direction", direction == MessageSearchDirection.UP ? "up" : "down"); - ConversationNative.Conversation_HandleMethodCall("loadMsgWithKeywords", obj.ToString(), callback?.callbackId); + ChatAPIIOS.Conversation_HandleMethodCall("loadMsgWithKeywords", obj.ToString(), callback?.callbackId); } public override void LoadMessagesWithMsgType(string conversationId, ConversationType conversationType, MessageBodyType bodyType, string sender, long timestamp = -1, int count = 20, MessageSearchDirection direction = MessageSearchDirection.UP, ValueCallBack> callback = null) @@ -122,7 +122,7 @@ public override void LoadMessagesWithMsgType(string conversationId, Conversation obj.Add("count", count); obj.Add("timestamp", timestamp); obj.Add("direction", direction == MessageSearchDirection.UP ? "up" : "down"); - ConversationNative.Conversation_HandleMethodCall("loadMsgWithMsgType", obj.ToString(), callback?.callbackId); + ChatAPIIOS.Conversation_HandleMethodCall("loadMsgWithMsgType", obj.ToString(), callback?.callbackId); } public override void LoadMessagesWithTime(string conversationId, ConversationType conversationType, long startTime, long endTime, int count = 20, ValueCallBack> callback = null) @@ -133,7 +133,7 @@ public override void LoadMessagesWithTime(string conversationId, ConversationTyp obj.Add("startTime", startTime); obj.Add("endTime", endTime); obj.Add("count", count); - ConversationNative.Conversation_HandleMethodCall("loadMsgWithTime", obj.ToString(), callback?.callbackId); + ChatAPIIOS.Conversation_HandleMethodCall("loadMsgWithTime", obj.ToString(), callback?.callbackId); } public override void MarkAllMessageAsRead(string conversationId, ConversationType conversationType) @@ -141,7 +141,7 @@ public override void MarkAllMessageAsRead(string conversationId, ConversationTyp JSONObject obj = new JSONObject(); obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(conversationType)); - ConversationNative.Conversation_HandleMethodCall("markAllMessagesAsRead", obj.ToString()); + ChatAPIIOS.Conversation_HandleMethodCall("markAllMessagesAsRead", obj.ToString()); } public override void MarkMessageAsRead(string conversationId, ConversationType conversationType, string messageId) @@ -150,7 +150,7 @@ public override void MarkMessageAsRead(string conversationId, ConversationType c obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(conversationType)); obj.Add("msgId", messageId); - ConversationNative.Conversation_HandleMethodCall("markMessageAsRead", obj.ToString()); + ChatAPIIOS.Conversation_HandleMethodCall("markMessageAsRead", obj.ToString()); } public override void SetExt(string conversationId, ConversationType conversationType, Dictionary ext) @@ -159,7 +159,7 @@ public override void SetExt(string conversationId, ConversationType conversation obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(conversationType)); obj.Add("ext", TransformTool.JsonStringFromDictionary(ext)); - ConversationNative.Conversation_HandleMethodCall("syncConversationExt", obj.ToString()); + ChatAPIIOS.Conversation_HandleMethodCall("syncConversationExt", obj.ToString()); } public override int UnReadCount(string conversationId, ConversationType conversationType) @@ -167,7 +167,7 @@ public override int UnReadCount(string conversationId, ConversationType conversa JSONObject obj = new JSONObject(); obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(conversationType)); - string jsonString = ConversationNative.Conversation_GetMethodCall("getUnreadMsgCount", obj.ToString()); + string jsonString = ChatAPIIOS.Conversation_GetMethodCall("getUnreadMsgCount", obj.ToString()); Dictionary dict = TransformTool.JsonStringToDictionary(jsonString); string countString = dict["count"]; return int.Parse(countString); @@ -179,18 +179,9 @@ public override bool UpdateMessage(string conversationId, ConversationType conve obj.Add("convId", conversationId); obj.Add("convType", TransformTool.ConversationTypeToInt(conversationType)); obj.Add("msg", message.ToJson()); - string ret = ConversationNative.Conversation_GetMethodCall("updateConversationMessage", obj.ToString()); + string ret = ChatAPIIOS.Conversation_GetMethodCall("updateConversationMessage", obj.ToString()); JSONNode jn = JSON.Parse(ret); return jn["ret"].AsBool; } } - - class ConversationNative - { - [DllImport("__Internal")] - internal extern static void Conversation_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); - - [DllImport("__Internal")] - internal extern static string Conversation_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); - } } \ No newline at end of file diff --git a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/GroupManager/GroupManager_iOS.cs b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/GroupManager/GroupManager_iOS.cs index 5e903e0d..792559e9 100644 --- a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/GroupManager/GroupManager_iOS.cs +++ b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/GroupManager/GroupManager_iOS.cs @@ -17,14 +17,14 @@ public override void applyJoinToGroup(string groupId, string reason, CallBack ha JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("reason", reason ?? ""); - GroupManagerNative.GroupManager_HandleMethodCall("requestToJoinPublicGroup", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("requestToJoinPublicGroup", obj.ToString(), handle?.callbackId); } public override void AcceptGroupInvitation(string groupId, ValueCallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); - GroupManagerNative.GroupManager_HandleMethodCall("acceptInvitationFromGroup", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("acceptInvitationFromGroup", obj.ToString(), handle?.callbackId); } public override void AcceptGroupJoinApplication(string groupId, string username, CallBack handle = null) @@ -32,7 +32,7 @@ public override void AcceptGroupJoinApplication(string groupId, string username, JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("username", username); - GroupManagerNative.GroupManager_HandleMethodCall("acceptJoinApplication", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("acceptJoinApplication", obj.ToString(), handle?.callbackId); } public override void AddGroupAdmin(string groupId, string memberId, CallBack handle = null) @@ -40,7 +40,7 @@ public override void AddGroupAdmin(string groupId, string memberId, CallBack han JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("memberId", memberId); - GroupManagerNative.GroupManager_HandleMethodCall("addAdmin", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("addAdmin", obj.ToString(), handle?.callbackId); } public override void AddGroupMembers(string groupId, List members, CallBack handle = null) @@ -48,7 +48,7 @@ public override void AddGroupMembers(string groupId, List members, CallB JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - GroupManagerNative.GroupManager_HandleMethodCall("addMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("addMembers", obj.ToString(), handle?.callbackId); } public override void AddGroupWhiteList(string groupId, List members, CallBack handle = null) @@ -56,14 +56,14 @@ public override void AddGroupWhiteList(string groupId, List members, Cal JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - GroupManagerNative.GroupManager_HandleMethodCall("addWhiteList", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("addWhiteList", obj.ToString(), handle?.callbackId); } public override void BlockGroup(string groupId, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); - GroupManagerNative.GroupManager_HandleMethodCall("blockGroup", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("blockGroup", obj.ToString(), handle?.callbackId); } public override void BlockGroupMembers(string groupId, List members, CallBack handle = null) @@ -71,7 +71,7 @@ public override void BlockGroupMembers(string groupId, List members, Cal JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - GroupManagerNative.GroupManager_HandleMethodCall("blockMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("blockMembers", obj.ToString(), handle?.callbackId); } public override void ChangeGroupDescription(string groupId, string desc, CallBack handle = null) @@ -79,7 +79,7 @@ public override void ChangeGroupDescription(string groupId, string desc, CallBac JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("desc", desc); - GroupManagerNative.GroupManager_HandleMethodCall("updateDescription", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("updateDescription", obj.ToString(), handle?.callbackId); } public override void ChangeGroupName(string groupId, string name, CallBack handle = null) @@ -87,7 +87,7 @@ public override void ChangeGroupName(string groupId, string name, CallBack handl JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("name", name); - GroupManagerNative.GroupManager_HandleMethodCall("updateGroupSubject", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("updateGroupSubject", obj.ToString(), handle?.callbackId); } public override void ChangeGroupOwner(string groupId, string newOwner, CallBack handle = null) @@ -95,14 +95,14 @@ public override void ChangeGroupOwner(string groupId, string newOwner, CallBack JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("owner", newOwner); - GroupManagerNative.GroupManager_HandleMethodCall("updateGroupOwner", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("updateGroupOwner", obj.ToString(), handle?.callbackId); } public override void CheckIfInGroupWhiteList(string groupId, ValueCallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); - GroupManagerNative.GroupManager_HandleMethodCall("checkIfInGroupWhiteList", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("checkIfInGroupWhiteList", obj.ToString(), handle?.callbackId); } public override void CreateGroup(string groupName, GroupOptions options, string desc, List inviteMembers = null, string inviteReason = null, ValueCallBack handle = null) @@ -113,7 +113,7 @@ public override void CreateGroup(string groupName, GroupOptions options, string obj.Add("inviteMembers", TransformTool.JsonStringFromStringList(inviteMembers)); obj.Add("inviteReason", inviteReason ?? ""); obj.Add("options", options.ToJsonString()); - GroupManagerNative.GroupManager_HandleMethodCall("createGroup", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("createGroup", obj.ToString(), handle?.callbackId); } public override void DeclineGroupInvitation(string groupId, string reason = null, CallBack handle = null) @@ -121,7 +121,7 @@ public override void DeclineGroupInvitation(string groupId, string reason = null JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("reason", reason ?? ""); - GroupManagerNative.GroupManager_HandleMethodCall("declineInvitationFromGroup", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("declineInvitationFromGroup", obj.ToString(), handle?.callbackId); } public override void DeclineGroupJoinApplication(string groupId, string username, string reason = null, CallBack handle = null) @@ -130,14 +130,14 @@ public override void DeclineGroupJoinApplication(string groupId, string username obj.Add("groupId", groupId); obj.Add("username", username); obj.Add("reason", reason ?? ""); - GroupManagerNative.GroupManager_HandleMethodCall("declineJoinApplication", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("declineJoinApplication", obj.ToString(), handle?.callbackId); } public override void DestroyGroup(string groupId, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); - GroupManagerNative.GroupManager_HandleMethodCall("destroyGroup", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("destroyGroup", obj.ToString(), handle?.callbackId); } public override void DownloadGroupSharedFile(string groupId, string fileId, string savePath, CallBack handle = null) @@ -146,14 +146,14 @@ public override void DownloadGroupSharedFile(string groupId, string fileId, stri obj.Add("groupId", groupId); obj.Add("fileId", fileId); obj.Add("savePath", savePath); - GroupManagerNative.GroupManager_HandleMethodCall("downloadGroupSharedFile", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("downloadGroupSharedFile", obj.ToString(), handle?.callbackId); } public override void GetGroupAnnouncementFromServer(string groupId, ValueCallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); - GroupManagerNative.GroupManager_HandleMethodCall("getGroupAnnouncementFromServer", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("getGroupAnnouncementFromServer", obj.ToString(), handle?.callbackId); } public override void GetGroupBlockListFromServer(string groupId, int pageNum = 1, int pageSize = 200, ValueCallBack> handle = null) @@ -162,7 +162,7 @@ public override void GetGroupBlockListFromServer(string groupId, int pageNum = 1 obj.Add("groupId", groupId); obj.Add("pageNum", pageNum); obj.Add("pageSize", pageSize); - GroupManagerNative.GroupManager_HandleMethodCall("getGroupBlockListFromServer", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("getGroupBlockListFromServer", obj.ToString(), handle?.callbackId); } public override void GetGroupFileListFromServer(string groupId, int pageNum = 1, int pageSize = 200, ValueCallBack> handle = null) @@ -171,7 +171,7 @@ public override void GetGroupFileListFromServer(string groupId, int pageNum = 1, obj.Add("groupId", groupId); obj.Add("pageNum", pageNum); obj.Add("pageSize", pageSize); - GroupManagerNative.GroupManager_HandleMethodCall("getGroupFileListFromServer", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("getGroupFileListFromServer", obj.ToString(), handle?.callbackId); } public override void GetGroupMemberListFromServer(string groupId, int pageSize = 200, string cursor = "", ValueCallBack> handle = null) @@ -180,7 +180,7 @@ public override void GetGroupMemberListFromServer(string groupId, int pageSize = obj.Add("groupId", groupId); obj.Add("cursor", cursor ?? ""); obj.Add("pageSize", pageSize); - GroupManagerNative.GroupManager_HandleMethodCall("getGroupMemberListFromServer", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("getGroupMemberListFromServer", obj.ToString(), handle?.callbackId); } public override void GetGroupMuteListFromServer(string groupId, int pageNum = 1, int pageSize = 200, ValueCallBack> handle = null) @@ -189,28 +189,28 @@ public override void GetGroupMuteListFromServer(string groupId, int pageNum = 1, obj.Add("groupId", groupId); obj.Add("pageNum", pageNum); obj.Add("pageSize", pageSize); - GroupManagerNative.GroupManager_HandleMethodCall("getGroupMuteListFromServer", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("getGroupMuteListFromServer", obj.ToString(), handle?.callbackId); } public override void GetGroupSpecificationFromServer(string groupId, ValueCallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); - GroupManagerNative.GroupManager_HandleMethodCall("getGroupSpecificationFromServer", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("getGroupSpecificationFromServer", obj.ToString(), handle?.callbackId); } public override void GetGroupWhiteListFromServer(string groupId, ValueCallBack> handle = null) { JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); - GroupManagerNative.GroupManager_HandleMethodCall("getGroupWhiteListFromServer", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("getGroupWhiteListFromServer", obj.ToString(), handle?.callbackId); } public override Group GetGroupWithId(string groupId) { JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); - string jsonString = GroupManagerNative.GroupManager_GetMethodCall("getGroupWithId", obj.ToString()); + string jsonString = ChatAPIIOS.GroupManager_GetMethodCall("getGroupWithId", obj.ToString()); if (jsonString == null || jsonString.Length == 0) { return null; } @@ -220,7 +220,7 @@ public override Group GetGroupWithId(string groupId) public override List GetJoinedGroups() { - string jsonString = GroupManagerNative.GroupManager_GetMethodCall("getJoinedGroups"); + string jsonString = ChatAPIIOS.GroupManager_GetMethodCall("getJoinedGroups"); List list = new List(); if (jsonString == null || jsonString.Length == 0) { @@ -237,7 +237,7 @@ public override void FetchJoinedGroupsFromServer(int pageNum = 1, int pageSize = JSONObject obj = new JSONObject(); obj.Add("pageNum", pageNum); obj.Add("pageSize", pageSize); - GroupManagerNative.GroupManager_HandleMethodCall("getJoinedGroupsFromServer", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("getJoinedGroupsFromServer", obj.ToString(), handle?.callbackId); } public override void FetchPublicGroupsFromServer(int pageSize = 200, string cursor = "", ValueCallBack> handle = null) @@ -246,28 +246,28 @@ public override void FetchPublicGroupsFromServer(int pageSize = 200, string curs obj.Add("cursor", cursor ?? ""); obj.Add("pageSize", pageSize); string jsonString = obj.ToString(); - GroupManagerNative.GroupManager_HandleMethodCall("getPublicGroupsFromServer", jsonString, handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("getPublicGroupsFromServer", jsonString, handle?.callbackId); } public override void JoinPublicGroup(string groupId, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); - GroupManagerNative.GroupManager_HandleMethodCall("joinPublicGroup", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("joinPublicGroup", obj.ToString(), handle?.callbackId); } public override void LeaveGroup(string groupId, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); - GroupManagerNative.GroupManager_HandleMethodCall("leaveGroup", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("leaveGroup", obj.ToString(), handle?.callbackId); } public override void MuteGroupAllMembers(string groupId, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); - GroupManagerNative.GroupManager_HandleMethodCall("muteAllMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("muteAllMembers", obj.ToString(), handle?.callbackId); } public override void MuteGroupMembers(string groupId, List members, CallBack handle = null) @@ -275,7 +275,7 @@ public override void MuteGroupMembers(string groupId, List members, Call JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - GroupManagerNative.GroupManager_HandleMethodCall("muteMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("muteMembers", obj.ToString(), handle?.callbackId); } public override void RemoveGroupAdmin(string groupId, string memberId, CallBack handle = null) @@ -283,7 +283,7 @@ public override void RemoveGroupAdmin(string groupId, string memberId, CallBack JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("admin", memberId); - GroupManagerNative.GroupManager_HandleMethodCall("removeAdmin", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("removeAdmin", obj.ToString(), handle?.callbackId); } public override void DeleteGroupSharedFile(string groupId, string fileId, CallBack handle = null) @@ -291,7 +291,7 @@ public override void DeleteGroupSharedFile(string groupId, string fileId, CallBa JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("fileId", fileId); - GroupManagerNative.GroupManager_HandleMethodCall("removeGroupSharedFile", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("removeGroupSharedFile", obj.ToString(), handle?.callbackId); } public override void DeleteGroupMembers(string groupId, List members, CallBack handle = null) @@ -299,7 +299,7 @@ public override void DeleteGroupMembers(string groupId, List members, Ca JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - GroupManagerNative.GroupManager_HandleMethodCall("removeMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("removeMembers", obj.ToString(), handle?.callbackId); } public override void RemoveGroupWhiteList(string groupId, List members, CallBack handle = null) @@ -307,14 +307,14 @@ public override void RemoveGroupWhiteList(string groupId, List members, JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - GroupManagerNative.GroupManager_HandleMethodCall("removeWhiteList", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("removeWhiteList", obj.ToString(), handle?.callbackId); } public override void UnBlockGroup(string groupId, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); - GroupManagerNative.GroupManager_HandleMethodCall("unblockGroup", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("unblockGroup", obj.ToString(), handle?.callbackId); } public override void UnBlockGroupMembers(string groupId, List members, CallBack handle = null) @@ -322,14 +322,14 @@ public override void UnBlockGroupMembers(string groupId, List members, C JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - GroupManagerNative.GroupManager_HandleMethodCall("unblockMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("unblockMembers", obj.ToString(), handle?.callbackId); } public override void UnMuteGroupAllMembers(string groupId, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); - GroupManagerNative.GroupManager_HandleMethodCall("unMuteAllMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("unMuteAllMembers", obj.ToString(), handle?.callbackId); } public override void UnMuteGroupMembers(string groupId, List members, CallBack handle = null) @@ -337,7 +337,7 @@ public override void UnMuteGroupMembers(string groupId, List members, Ca JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - GroupManagerNative.GroupManager_HandleMethodCall("unMuteMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("unMuteMembers", obj.ToString(), handle?.callbackId); } public override void UpdateGroupAnnouncement(string groupId, string announcement, CallBack handle = null) @@ -345,7 +345,7 @@ public override void UpdateGroupAnnouncement(string groupId, string announcement JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("announcement", announcement ?? ""); - GroupManagerNative.GroupManager_HandleMethodCall("updateGroupAnnouncement", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("updateGroupAnnouncement", obj.ToString(), handle?.callbackId); } public override void UpdateGroupExt(string groupId, string ext, CallBack handle = null) @@ -353,7 +353,7 @@ public override void UpdateGroupExt(string groupId, string ext, CallBack handle JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("ext", ext ?? ""); - GroupManagerNative.GroupManager_HandleMethodCall("updateGroupExt", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("updateGroupExt", obj.ToString(), handle?.callbackId); } public override void UploadGroupSharedFile(string groupId, string filePath, CallBack handle = null) @@ -361,16 +361,7 @@ public override void UploadGroupSharedFile(string groupId, string filePath, Call JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("filePath", filePath); - GroupManagerNative.GroupManager_HandleMethodCall("uploadGroupSharedFile", obj.ToString(), handle?.callbackId); + ChatAPIIOS.GroupManager_HandleMethodCall("uploadGroupSharedFile", obj.ToString(), handle?.callbackId); } } - - class GroupManagerNative - { - [DllImport("__Internal")] - internal extern static void GroupManager_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); - - [DllImport("__Internal")] - internal extern static string GroupManager_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); - } } \ No newline at end of file diff --git a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/PushManager/PushManager_iOS.cs b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/PushManager/PushManager_iOS.cs index bf1fb73a..803aa22d 100644 --- a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/PushManager/PushManager_iOS.cs +++ b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/PushManager/PushManager_iOS.cs @@ -8,7 +8,7 @@ internal sealed class PushManager_iOS : IPushManager { public List GetNoDisturbGroups() { - string jsonString = PushManagerNative.PushManager_GetMethodCall("getNoDisturbGroups"); + string jsonString = ChatAPIIOS.PushManager_GetMethodCall("getNoDisturbGroups"); if (jsonString == null || jsonString.Length == 0) { return null; @@ -18,7 +18,7 @@ public List GetNoDisturbGroups() public PushConfig GetPushConfig() { - string jsonString = PushManagerNative.PushManager_GetMethodCall("getPushConfig", null, null); + string jsonString = ChatAPIIOS.PushManager_GetMethodCall("getPushConfig", null, null); if(jsonString == null || jsonString.Length == 0) { return null; @@ -28,7 +28,7 @@ public PushConfig GetPushConfig() public void GetPushConfigFromServer(ValueCallBack handle = null) { - PushManagerNative.PushManager_HandleMethodCall("getPushConfigFromServer", null, handle?.callbackId); + ChatAPIIOS.PushManager_HandleMethodCall("getPushConfigFromServer", null, handle?.callbackId); } public void SetGroupToDisturb(string groupId, bool noDisturb, CallBack handle = null) @@ -36,7 +36,7 @@ public void SetGroupToDisturb(string groupId, bool noDisturb, CallBack handle = JSONObject obj = new JSONObject(); obj.Add("groupId", groupId); obj.Add("noDisturb", noDisturb); - PushManagerNative.PushManager_HandleMethodCall("updateGroupPushService", obj.ToString(), handle?.callbackId); + ChatAPIIOS.PushManager_HandleMethodCall("updateGroupPushService", obj.ToString(), handle?.callbackId); } public void SetNoDisturb(bool noDisturb, int startTime = 0, int endTime = 24, CallBack handle = null) @@ -45,14 +45,14 @@ public void SetNoDisturb(bool noDisturb, int startTime = 0, int endTime = 24, Ca obj.Add("noDisturb", noDisturb); obj.Add("startTime", startTime); obj.Add("endTime", endTime); - PushManagerNative.PushManager_HandleMethodCall("PushNoDisturb", obj.ToString(), handle?.callbackId); + ChatAPIIOS.PushManager_HandleMethodCall("PushNoDisturb", obj.ToString(), handle?.callbackId); } public void SetPushStyle(PushStyle pushStyle, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("style", pushStyle == PushStyle.Simple ? 0 : 1 ); - PushManagerNative.PushManager_HandleMethodCall("updatePushStyle", obj.ToString(), handle?.callbackId); + ChatAPIIOS.PushManager_HandleMethodCall("updatePushStyle", obj.ToString(), handle?.callbackId); } public void UpdateFCMPushToken(string token, CallBack handle = null) @@ -69,23 +69,15 @@ public void UpdateAPNSPuthToken(string token, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("deviceToken", token); - PushManagerNative.PushManager_HandleMethodCall("updateDeviceToken", obj.ToString(), handle?.callbackId); + ChatAPIIOS.PushManager_HandleMethodCall("updateDeviceToken", obj.ToString(), handle?.callbackId); } public void UpdatePushNickName(string nickname, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("nickname", nickname); - PushManagerNative.PushManager_HandleMethodCall("updatePushNickname", obj.ToString(), handle?.callbackId); + ChatAPIIOS.PushManager_HandleMethodCall("updatePushNickname", obj.ToString(), handle?.callbackId); } } - class PushManagerNative - { - [DllImport("__Internal")] - internal extern static void PushManager_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); - - [DllImport("__Internal")] - internal extern static string PushManager_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); - } } diff --git a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/RoomManager/RoomManager_iOS.cs b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/RoomManager/RoomManager_iOS.cs index de96e792..13addbbb 100644 --- a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/RoomManager/RoomManager_iOS.cs +++ b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/RoomManager/RoomManager_iOS.cs @@ -16,7 +16,7 @@ public override void AddRoomAdmin(string roomId, string memberId, CallBack handl JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); obj.Add("admin", memberId); - RoomManagerNative.RoomManager_HandleMethodCall("addChatRoomAdmin", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("addChatRoomAdmin", obj.ToString(), handle?.callbackId); } public override void BlockRoomMembers(string roomId, List members, CallBack handle = null) @@ -24,7 +24,7 @@ public override void BlockRoomMembers(string roomId, List members, CallB JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - RoomManagerNative.RoomManager_HandleMethodCall("blockChatRoomMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("blockChatRoomMembers", obj.ToString(), handle?.callbackId); } public override void ChangeRoomOwner(string roomId, string newOwner, CallBack handle = null) @@ -32,7 +32,7 @@ public override void ChangeRoomOwner(string roomId, string newOwner, CallBack ha JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); obj.Add("newOwner", newOwner); - RoomManagerNative.RoomManager_HandleMethodCall("changeChatRoomOwner", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("changeChatRoomOwner", obj.ToString(), handle?.callbackId); } public override void ChangeRoomDescription(string roomId, string newDescription, CallBack handle = null) @@ -40,7 +40,7 @@ public override void ChangeRoomDescription(string roomId, string newDescription, JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); obj.Add("desc", newDescription); - RoomManagerNative.RoomManager_HandleMethodCall("changeChatRoomDescription", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("changeChatRoomDescription", obj.ToString(), handle?.callbackId); } public override void ChangeRoomName(string roomId, string newName, CallBack handle = null) @@ -48,7 +48,7 @@ public override void ChangeRoomName(string roomId, string newName, CallBack hand JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); obj.Add("subject", newName); - RoomManagerNative.RoomManager_HandleMethodCall("changeChatRoomSubject", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("changeChatRoomSubject", obj.ToString(), handle?.callbackId); } public override void CreateRoom(string subject, string descriptions, string welcomeMsg, int maxUserCount = 300, List members = null, ValueCallBack handle = null) @@ -59,14 +59,14 @@ public override void CreateRoom(string subject, string descriptions, string welc obj.Add("maxUserCount", maxUserCount); obj.Add("welcomeMsg", welcomeMsg ?? ""); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - RoomManagerNative.RoomManager_HandleMethodCall("createChatroom", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("createChatroom", obj.ToString(), handle?.callbackId); } public override void DestroyRoom(string roomId, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); - RoomManagerNative.RoomManager_HandleMethodCall("destroyChatRoom", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("destroyChatRoom", obj.ToString(), handle?.callbackId); } public override void FetchPublicRoomsFromServer(int pageNum = 1, int pageSize = 200, ValueCallBack> handle = null) @@ -74,14 +74,14 @@ public override void FetchPublicRoomsFromServer(int pageNum = 1, int pageSize = JSONObject obj = new JSONObject(); obj.Add("pageNum", pageNum); obj.Add("pageSize", pageSize); - RoomManagerNative.RoomManager_HandleMethodCall("fetchPublicChatRoomsFromServer", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("fetchPublicChatRoomsFromServer", obj.ToString(), handle?.callbackId); } public override void FetchRoomAnnouncement(string roomId, ValueCallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); - RoomManagerNative.RoomManager_HandleMethodCall("fetchChatRoomAnnouncement", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("fetchChatRoomAnnouncement", obj.ToString(), handle?.callbackId); } public override void FetchRoomBlockList(string roomId, int pageNum = 1, int pageSize = 200, ValueCallBack> handle = null) @@ -90,14 +90,14 @@ public override void FetchRoomBlockList(string roomId, int pageNum = 1, int page obj.Add("roomId", roomId); obj.Add("pageNum", pageNum); obj.Add("pageSize", pageSize); - RoomManagerNative.RoomManager_HandleMethodCall("fetchChatRoomBlockList", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("fetchChatRoomBlockList", obj.ToString(), handle?.callbackId); } public override void FetchRoomInfoFromServer(string roomId, ValueCallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); - RoomManagerNative.RoomManager_HandleMethodCall("fetchChatRoomInfoFromServer", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("fetchChatRoomInfoFromServer", obj.ToString(), handle?.callbackId); } public override void FetchRoomMembers(string roomId, string cursor = "", int pageSize = 200, ValueCallBack> handle = null) @@ -106,7 +106,7 @@ public override void FetchRoomMembers(string roomId, string cursor = "", int pag obj.Add("roomId", roomId); obj.Add("cursor", cursor); obj.Add("pageSize", pageSize); - RoomManagerNative.RoomManager_HandleMethodCall("fetchChatRoomMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("fetchChatRoomMembers", obj.ToString(), handle?.callbackId); } public override void FetchRoomMuteList(string roomId, int pageSize = 1, int pageNum = 200, ValueCallBack> handle = null) @@ -115,21 +115,21 @@ public override void FetchRoomMuteList(string roomId, int pageSize = 1, int page obj.Add("roomId", roomId); obj.Add("pageNum", pageNum); obj.Add("pageSize", pageSize); - RoomManagerNative.RoomManager_HandleMethodCall("fetchChatRoomMuteList", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("fetchChatRoomMuteList", obj.ToString(), handle?.callbackId); } public override void JoinRoom(string roomId, ValueCallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); - RoomManagerNative.RoomManager_HandleMethodCall("joinChatRoom", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("joinChatRoom", obj.ToString(), handle?.callbackId); } public override void LeaveRoom(string roomId, CallBack handle = null) { JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); - RoomManagerNative.RoomManager_HandleMethodCall("leaveChatRoom", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("leaveChatRoom", obj.ToString(), handle?.callbackId); } public override void MuteRoomMembers(string roomId, List members, CallBack handle = null) @@ -137,7 +137,7 @@ public override void MuteRoomMembers(string roomId, List members, CallBa JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - RoomManagerNative.RoomManager_HandleMethodCall("muteChatRoomMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("muteChatRoomMembers", obj.ToString(), handle?.callbackId); } public override void RemoveRoomAdmin(string roomId, string adminId, CallBack handle = null) @@ -145,7 +145,7 @@ public override void RemoveRoomAdmin(string roomId, string adminId, CallBack han JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); obj.Add("admin", adminId); - RoomManagerNative.RoomManager_HandleMethodCall("removeChatRoomAdmin", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("removeChatRoomAdmin", obj.ToString(), handle?.callbackId); } public override void DeleteRoomMembers(string roomId, List members, CallBack handle = null) @@ -153,7 +153,7 @@ public override void DeleteRoomMembers(string roomId, List members, Call JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - RoomManagerNative.RoomManager_HandleMethodCall("removeChatRoomMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("removeChatRoomMembers", obj.ToString(), handle?.callbackId); } public override void UnBlockRoomMembers(string roomId, List members, CallBack handle = null) @@ -161,7 +161,7 @@ public override void UnBlockRoomMembers(string roomId, List members, Cal JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - RoomManagerNative.RoomManager_HandleMethodCall("unBlockChatRoomMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("unBlockChatRoomMembers", obj.ToString(), handle?.callbackId); } public override void UnMuteRoomMembers(string roomId, List members, CallBack handle = null) @@ -169,7 +169,7 @@ public override void UnMuteRoomMembers(string roomId, List members, Call JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); obj.Add("members", TransformTool.JsonStringFromStringList(members)); - RoomManagerNative.RoomManager_HandleMethodCall("unMuteChatRoomMembers", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("unMuteChatRoomMembers", obj.ToString(), handle?.callbackId); } public override void UpdateRoomAnnouncement(string roomId, string announcement, CallBack handle = null) @@ -177,17 +177,7 @@ public override void UpdateRoomAnnouncement(string roomId, string announcement, JSONObject obj = new JSONObject(); obj.Add("roomId", roomId); obj.Add("announcement", announcement); - RoomManagerNative.RoomManager_HandleMethodCall("updateChatRoomAnnouncement", obj.ToString(), handle?.callbackId); + ChatAPIIOS.RoomManager_HandleMethodCall("updateChatRoomAnnouncement", obj.ToString(), handle?.callbackId); } } - - - class RoomManagerNative - { - [DllImport("__Internal")] - internal extern static void RoomManager_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); - - [DllImport("__Internal")] - internal extern static string RoomManager_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); - } } \ No newline at end of file diff --git a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/UserInfoManager/UserInfoManager_iOS.cs b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/UserInfoManager/UserInfoManager_iOS.cs index 869b843e..d5968f89 100644 --- a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/UserInfoManager/UserInfoManager_iOS.cs +++ b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/UserInfoManager/UserInfoManager_iOS.cs @@ -17,7 +17,7 @@ internal void FetchUserInfoByAttribute(List idList, List a public override void FetchUserInfoByUserId(List idList, ValueCallBack> handle = null) { string jsonString = TransformTool.JsonStringFromStringList(idList); - UserInfoManagerNative.UserInfoManager_MethodCall("fetchUserInfoByUserId", jsonString, callbackId: handle?.callbackId); + ChatAPIIOS.UserInfoManager_MethodCall("fetchUserInfoByUserId", jsonString, callbackId: handle?.callbackId); } @@ -30,18 +30,8 @@ internal void UpdateOwnByAttribute(UserInfoType userInfoType, string value, Valu public override void UpdateOwnInfo(UserInfo userInfo, CallBack handle = null) { string jsonString = TransformTool.JsonStringFromUserInfo(userInfo); - UserInfoManagerNative.UserInfoManager_MethodCall("updateOwnInfo", jsonString, callbackId:handle?.callbackId); + ChatAPIIOS.UserInfoManager_MethodCall("updateOwnInfo", jsonString, callbackId:handle?.callbackId); } } - - - class UserInfoManagerNative - { - [DllImport("__Internal")] - internal extern static void UserInfoManager_MethodCall(string methodName, string jsonString = null, string callbackId = null); - - [DllImport("__Internal")] - internal extern static string UserInfoManager_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); - } } diff --git a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/native/ChatAPIIOS.cs b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/native/ChatAPIIOS.cs new file mode 100644 index 00000000..7335b70f --- /dev/null +++ b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/native/ChatAPIIOS.cs @@ -0,0 +1,71 @@ +using System.Runtime.InteropServices; +using System; + +namespace ChatSDK +{ + public sealed class ChatAPIIOS + { + #region DllImport + +#if UNITY_IPHONE + + public const string MyLibName = "__Internal"; + +#else + + public const string MyLibName = "hyphenateCWrapper"; + +#endif + [DllImport(MyLibName)] + internal extern static void Client_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static string Client_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static void ChatManager_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static string ChatManager_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static void Conversation_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static string Conversation_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static void ContactManager_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static string ContactManager_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static void GroupManager_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static string GroupManager_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static void RoomManager_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static string RoomManager_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static void UserInfoManager_MethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static string UserInfoManager_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static void PushManager_HandleMethodCall(string methodName, string jsonString = null, string callbackId = null); + + [DllImport(MyLibName)] + internal extern static string PushManager_GetMethodCall(string methodName, string jsonString = null, string callbackId = null); + + #endregion iOS API import + } +} + + diff --git a/ChatSDKDemo/Assets/ChatSDK/Plugins/Android/libs/unity_chat_sdk.jar b/ChatSDKDemo/Assets/ChatSDK/Plugins/Android/libs/unity_chat_sdk.jar index c0c46ca988c57542a5f2c1cdf7de4bacb41671b3..439107898871b6b8f7f31162575613cefafedac5 100644 GIT binary patch delta 9738 zcmZWubzIa-wBH|{N|$tZcY}m6lh#(Du3rMH1z|!4~ASorOGzdsZ2reZd2qFS+ zS-kf?-`juYd`^5%?3~%zIoVxkJzZ$H+G@xsSRfDv2B;=1F%j1Txe~s-WI`;J>^DpO zrzGHJZE!*AM-UJp6t)`%#0o_Ku|iSg5eiEvxkw1&1-dUDf;cDDK}HZ7_a<%$S{mrB zP8*%^Er*0D6X^~dPH$j-Meh;`1gb}a&@suqX1#MO$LHWdM#wpFD`R-z@@|wHc|!uX z?5!QkuL5ZeWDp1o1EO6d50#Ao&>NWfjBc%i1aofv(TSknayZ0kZwXB)UKB)d!E%3M zx~EWZn`*bB1~x*3r^AhfAmmKFZk1atlyAckoGgN|!rc;~L#$vNkOK>}1{s?Nx6sk{ zgs2F!Jm-vC_fk)*i1BZ->?o4+WrSz(4g~~Kgy?XyLmhJgQpl(r23UXi>9j17)U;%5 zoZ7VfaDz7OL?0W<5uQAo9II;a159F742g;;DaNPS^_$8%(lMy|*1->tbs{C6DijOX zVPKCh!CGOT(~rh2RyvV=qq(U3o{&wrnR59EE(s0kest674Ga&EbT3?I2#2{W(ika2 zEEyRS6onF>O3pVZOM*YgWW981IOZm>QhRYCVfH;AV`vvfsOP3zc=6KXA>jaJUd}g<*gi9U3C4IHu$pLB{B3b*_jtnK*T*!2YQ8is zHpNeezC@V179)f8Khwl#?zTcBKQlg1%gG-Fe@N8v+lXySUUS)gJgA5%kMllP;+)?FeCcnY_ui`R}wv9}V}h&u+aK74r^X05^^uKB;NL ziBVbAez(t3{uU=w0IcbDn$E2(FFyJVPfPQmt?H(<@Yb5+3A=HAUWt-!xHK|Mt~t4g zdfRwGqw+iI$b!FHXxMlWk7eSlq#__>mNz3F-%F4htgq|KnPTXc$e-*P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|I+^!`&Um0o5{Le-BxUp-pcTE?FIZ?Q~66zru090qwL$c z^T~!s`BD3SsNrmY8R5DK*(}2w9;yc3|2=@NjQ-UV!CZ~u`|xS@?WpZ@;P$>+Uh}N5 zj&Oh&ab6u@d{q?E+-#7dJUBE=XH+uNrfH={p K1K~$1=>GvoKcGwi diff --git a/Unity_SDK/android_build/unity_chat_sdk/src/main/java/com/hyphenate/unity_chat_sdk/helper/EMMessageBodyHelper.java b/Unity_SDK/android_build/unity_chat_sdk/src/main/java/com/hyphenate/unity_chat_sdk/helper/EMMessageBodyHelper.java index a75fea3c..425d2bde 100644 --- a/Unity_SDK/android_build/unity_chat_sdk/src/main/java/com/hyphenate/unity_chat_sdk/helper/EMMessageBodyHelper.java +++ b/Unity_SDK/android_build/unity_chat_sdk/src/main/java/com/hyphenate/unity_chat_sdk/helper/EMMessageBodyHelper.java @@ -231,7 +231,11 @@ public static EMVideoMessageBody videoBodyFromJson(JSONObject json) throws JSONE int duration = json.getInt("duration"); int fileSize = json.getInt("fileSize"); EMVideoMessageBody body = new EMVideoMessageBody(localPath, "", duration, fileSize); - body.setThumbnailUrl(json.getString("thumbnailRemotePath")); + + if (json.has("thumbnailRemotePath")){ + body.setThumbnailUrl(json.getString("thumbnailRemotePath")); + } + if (json.has("thumbnailLocalPath")) { body.setLocalThumb(json.getString("thumbnailLocalPath")); } @@ -248,7 +252,11 @@ public static EMVideoMessageBody videoBodyFromJson(JSONObject json) throws JSONE body.setSecret(json.getString("secret")); } - body.setFileLength(json.getInt("fileSize")); + if(json.has("fileSize")) { + body.setFileLength(json.getInt("fileSize")); + } + + body.setDownloadStatus(downloadStatusFromInt(json.getInt("fileStatus"))); int width = json.getInt("height"); int height = json.getInt("width"); @@ -280,7 +288,6 @@ public static JSONObject videoBodyToJson(EMVideoMessageBody body) throws JSONExc data.put("secret", body.getSecret()); } data.put("fileStatus", downloadStatusToInt(body.downloadStatus())); - data.put("duration", body.getDuration()); data.put("fileSize", body.getVideoFileLength()); data.put("height", body.getThumbnailHeight()); From c114ef2e2d84b366709ec507c34841125da7b025 Mon Sep 17 00:00:00 2001 From: dujiepeng <347302029@qq.com> Date: Wed, 22 Dec 2021 12:24:13 +0800 Subject: [PATCH 3/3] upgrade version --- ChatSDKDemo/Assets/ChatSDK/ChatSDK/SDKClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/SDKClient.cs b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/SDKClient.cs index f66e9ad6..bcd72790 100644 --- a/ChatSDKDemo/Assets/ChatSDK/ChatSDK/SDKClient.cs +++ b/ChatSDKDemo/Assets/ChatSDK/ChatSDK/SDKClient.cs @@ -61,7 +61,7 @@ public static SDKClient Instance /// /// 获取sdk版本号 /// - public string SdkVersion { get => "2.2.0"; } + public string SdkVersion { get => "2.2.3"; } /// /// 获取当前登录的环信id