增加群组通知过滤
This commit is contained in:
@@ -14,6 +14,8 @@ def getCurrentProjectDir() {
|
||||
}
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.9.24'
|
||||
|
||||
repositories {
|
||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||
maven { url 'https://maven.aliyun.com/repository/central' }
|
||||
@@ -25,21 +27,26 @@ buildscript {
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.3.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.allprojects {
|
||||
repositories {
|
||||
maven {
|
||||
url 'http://192.168.77.132:8081/repository/mvn2-group'
|
||||
allowInsecureProtocol true
|
||||
}
|
||||
// 本地 AAR 调试配置 - 使用 rootProject.projectDir 确保路径正确
|
||||
// maven { url 'file://' + rootProject.projectDir.absolutePath + '/local-maven' }
|
||||
|
||||
// maven {
|
||||
// url 'http://192.168.77.132:8081/repository/mvn2-group'
|
||||
// allowInsecureProtocol true
|
||||
// }
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
namespace 'io.openim.flutter_openim_sdk'
|
||||
@@ -55,8 +62,12 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.openim:sdkcore:1.0.14'
|
||||
//implementation 'com.openim:sdkcore:1.0.15-local'
|
||||
implementation 'com.openim:sdkcore:1.0.16'
|
||||
}
|
||||
@@ -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