Update
This commit is contained in:
parent
b8a51374a3
commit
4c540fbff5
@ -1,3 +1,7 @@
|
||||
## 2.3.4+6
|
||||
|
||||
- Add setAppBackgroundStatus method for IMManager
|
||||
|
||||
## 2.3.4+5
|
||||
|
||||
- Fix bug
|
||||
|
@ -34,5 +34,5 @@ android {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
api 'io.openim:core-sdk:2.3.4-rc6@aar'
|
||||
api 'io.openim:core-sdk:2.3.4-rc7@aar'
|
||||
}
|
@ -61,4 +61,13 @@ public class IMManager extends BaseManager {
|
||||
value(methodCall, "fcmToken")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public void setAppBackgroundStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setAppBackgroundStatus(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "isBackground")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ public class IMMananger: BaseServiceManager {
|
||||
self["wakeUp"] = wakeUp
|
||||
self["uploadImage"] = uploadImage
|
||||
self["updateFcmToken"] = updateFcmToken
|
||||
self["setAppBackgroundStatus"] = setAppBackgroundStatus
|
||||
}
|
||||
|
||||
func initSDK(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
@ -41,6 +42,11 @@ public class IMMananger: BaseServiceManager {
|
||||
func updateFcmToken(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkUpdateFcmToken(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "fcmToken"])
|
||||
}
|
||||
|
||||
func setAppBackgroundStatus(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkSetAppBackgroundStatus(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[bool: "isBackground"])
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ConnListener: NSObject, Open_im_sdk_callbackOnConnListenerProtocol {
|
||||
|
@ -449,6 +449,18 @@ class IMManager {
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// 标记app处于后台
|
||||
Future setAppBackgroundStatus({
|
||||
required bool isBackground,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'setAppBackgroundStatus',
|
||||
_buildParam({
|
||||
'isBackground': isBackground,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "imManager";
|
||||
return param;
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: flutter_openim_sdk
|
||||
description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source.
|
||||
version: 2.3.4+5
|
||||
version: 2.3.4+6
|
||||
homepage: https://www.rentsoft.cn
|
||||
repository: https://github.com/OpenIMSDK/Open-IM-SDK-Flutter
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user