Merge pull request #26 from hrxiang/android
upgrade sdk, new add quote message
This commit is contained in:
commit
a4797ed671
@ -52,5 +52,5 @@ android {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
// implementation 'io.openim:client:0.0.13@aar'
|
// implementation 'io.openim:client:0.0.13@aar'
|
||||||
implementation 'io.openim:client-sdk:0.0.7@aar'
|
implementation 'io.openim:client-sdk:0.0.8@aar'
|
||||||
}
|
}
|
@ -1,7 +1,5 @@
|
|||||||
package io.openim.flutter_openim_sdk.manager;
|
package io.openim.flutter_openim_sdk.manager;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
@ -230,6 +228,13 @@ public class MessageManager {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void createQuoteMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createQuoteMessage(
|
||||||
|
CommonUtil.getQuoteMessageText(methodCall),
|
||||||
|
CommonUtil.getQuoteMessageBody(methodCall)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
public void getTotalUnreadMsgCount(MethodCall methodCall, MethodChannel.Result result) {
|
public void getTotalUnreadMsgCount(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
Open_im_sdk.getTotalUnreadMsgCount(new BaseListener(result));
|
Open_im_sdk.getTotalUnreadMsgCount(new BaseListener(result));
|
||||||
}
|
}
|
||||||
|
@ -284,6 +284,14 @@ public class CommonUtil {
|
|||||||
return getParamValue(methodCall, KEY_CUSTOM_MESSAGE_EXT);
|
return getParamValue(methodCall, KEY_CUSTOM_MESSAGE_EXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getQuoteMessageText(MethodCall methodCall) {
|
||||||
|
return getParamValue(methodCall, KEY_QUOTE_MESSAGE_TEXT);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getQuoteMessageBody(MethodCall methodCall) {
|
||||||
|
return getSDKJsonParam(methodCall, KEY_QUOTE_MESSAGE_BODY);
|
||||||
|
}
|
||||||
|
|
||||||
//login
|
//login
|
||||||
final static String KEY_UID = "uid";
|
final static String KEY_UID = "uid";
|
||||||
final static String KEY_TOKEN = "token";
|
final static String KEY_TOKEN = "token";
|
||||||
@ -308,6 +316,8 @@ public class CommonUtil {
|
|||||||
final static String KEY_MESSAGE_DES = "description";
|
final static String KEY_MESSAGE_DES = "description";
|
||||||
final static String KEY_CUSTOM_MESSAGE_DATA = "data";
|
final static String KEY_CUSTOM_MESSAGE_DATA = "data";
|
||||||
final static String KEY_CUSTOM_MESSAGE_EXT = "extension";
|
final static String KEY_CUSTOM_MESSAGE_EXT = "extension";
|
||||||
|
final static String KEY_QUOTE_MESSAGE_TEXT = "quoteText";
|
||||||
|
final static String KEY_QUOTE_MESSAGE_BODY = "quoteMessage";
|
||||||
//send message
|
//send message
|
||||||
final static String KEY_SEND_MESSAGE_CONTENT = "message";
|
final static String KEY_SEND_MESSAGE_CONTENT = "message";
|
||||||
final static String KEY_SEND_MESSAGE_CONTENT_CLIENT_ID = "clientMsgID";
|
final static String KEY_SEND_MESSAGE_CONTENT_CLIENT_ID = "clientMsgID";
|
||||||
|
@ -346,6 +346,21 @@ class MessageManager {
|
|||||||
.then((value) => _toObj(value));
|
.then((value) => _toObj(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
Future<Message> createQuoteMessage({
|
||||||
|
required String text,
|
||||||
|
required Message quoteMsg,
|
||||||
|
}) {
|
||||||
|
return _channel
|
||||||
|
.invokeMethod(
|
||||||
|
'createQuoteMessage',
|
||||||
|
_buildParam({
|
||||||
|
'quoteText': text,
|
||||||
|
'quoteMessage': quoteMsg.toJson(),
|
||||||
|
}))
|
||||||
|
.then((value) => _toObj(value));
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
Future<dynamic> getTotalUnreadMsgCount() {
|
Future<dynamic> getTotalUnreadMsgCount() {
|
||||||
return _channel.invokeMethod('getTotalUnreadMsgCount', _buildParam({}));
|
return _channel.invokeMethod('getTotalUnreadMsgCount', _buildParam({}));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user