增加群组通知过滤
This commit is contained in:
@@ -102,6 +102,69 @@ public class IMManager extends BaseManager {
|
||||
);
|
||||
}
|
||||
|
||||
public void setNotificationVisibilityRule(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setNotificationVisibilityRule(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "notificationType"),
|
||||
value(methodCall, "visibilityType")
|
||||
);
|
||||
}
|
||||
|
||||
public void setNotificationVisibilityRules(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setNotificationVisibilityRules(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "rulesJSON")
|
||||
);
|
||||
}
|
||||
|
||||
public void getNotificationVisibilityRule(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getNotificationVisibilityRule(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "notificationType")
|
||||
);
|
||||
}
|
||||
|
||||
public void getNotificationVisibilityRules(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getNotificationVisibilityRules(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void enableNotificationVisibilityRule(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.enableNotificationVisibilityRule(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "notificationType")
|
||||
);
|
||||
}
|
||||
|
||||
public void disableNotificationVisibilityRule(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.disableNotificationVisibilityRule(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "notificationType")
|
||||
);
|
||||
}
|
||||
|
||||
public void deleteNotificationVisibilityRule(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.deleteNotificationVisibilityRule(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "notificationType")
|
||||
);
|
||||
}
|
||||
|
||||
public void resetNotificationVisibilityRules(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.resetNotificationVisibilityRules(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
// public void setListenerForService(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.setListenerForService(new OnListenerForService());
|
||||
//
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
package io.openim.flutter_openim_sdk
|
||||
|
||||
import androidx.annotation.NonNull
|
||||
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin
|
||||
import io.flutter.plugin.common.MethodCall
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
|
||||
import io.flutter.plugin.common.MethodChannel.Result
|
||||
|
||||
/** FlutterOpenimSdkPlugin */
|
||||
class FlutterOpenimSdkPlugin: FlutterPlugin, MethodCallHandler {
|
||||
/// The MethodChannel that will the communication between Flutter and native Android
|
||||
///
|
||||
/// This local reference serves to register the plugin with the Flutter Engine and unregister it
|
||||
/// when the Flutter Engine is detached from the Activity
|
||||
private lateinit var channel : MethodChannel
|
||||
|
||||
override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
|
||||
channel = MethodChannel(flutterPluginBinding.binaryMessenger, "flutter_openim_sdk")
|
||||
channel.setMethodCallHandler(this)
|
||||
}
|
||||
|
||||
override fun onMethodCall(call: MethodCall, result: Result) {
|
||||
if (call.method == "getPlatformVersion") {
|
||||
result.success("Android ${android.os.Build.VERSION.RELEASE}")
|
||||
} else {
|
||||
result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {
|
||||
channel.setMethodCallHandler(null)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user