fix im connect error
This commit is contained in:
20
app/proguard-rules.pro
vendored
20
app/proguard-rules.pro
vendored
@@ -20,3 +20,23 @@
|
|||||||
# hide the original source file name.
|
# hide the original source file name.
|
||||||
#-renamesourcefileattribute SourceFile
|
#-renamesourcefileattribute SourceFile
|
||||||
|
|
||||||
|
# OpenIM SDK ProGuard rules
|
||||||
|
-keep class io.openim.android.sdk.** { *; }
|
||||||
|
-keep class io.openim.core.** { *; }
|
||||||
|
-keepclassmembers class io.openim.android.sdk.** { *; }
|
||||||
|
-keepclassmembers class io.openim.core.** { *; }
|
||||||
|
|
||||||
|
# Keep OpenIM models and listeners
|
||||||
|
-keep class io.openim.android.sdk.models.** { *; }
|
||||||
|
-keep class io.openim.android.sdk.listener.** { *; }
|
||||||
|
-keep class io.openim.android.sdk.enums.** { *; }
|
||||||
|
|
||||||
|
# Keep OpenIM Client and managers
|
||||||
|
-keep class io.openim.android.sdk.OpenIMClient { *; }
|
||||||
|
-keep class io.openim.android.sdk.manager.** { *; }
|
||||||
|
|
||||||
|
# Prevent obfuscation of callback methods
|
||||||
|
-keepclassmembers class * implements io.openim.android.sdk.listener.** {
|
||||||
|
public *;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,10 +101,11 @@ object AppState {
|
|||||||
|
|
||||||
val initConfig = InitConfig(
|
val initConfig = InitConfig(
|
||||||
"https://im.ravenow.ai/api",//SDK api地址
|
"https://im.ravenow.ai/api",//SDK api地址
|
||||||
"wss:///im.ravenow.ai/msg_gateway",//SDK WebSocket地址
|
"wss://im.ravenow.ai/msg_gateway",//SDK WebSocket地址
|
||||||
OpenIMManager.getStorageDir(context),//SDK数据库存储目录
|
OpenIMManager.getStorageDir(context),//SDK数据库存储目录
|
||||||
)
|
)
|
||||||
|
// initConfig.isLogStandardOutput = true;
|
||||||
|
// initConfig.logLevel = 6
|
||||||
// 使用 OpenIMManager 初始化 SDK
|
// 使用 OpenIMManager 初始化 SDK
|
||||||
OpenIMManager.initSDK(context, initConfig)
|
OpenIMManager.initSDK(context, initConfig)
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ class AuthInterceptor() : Interceptor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
requestBuilder.addHeader("Authorization", "Bearer ${AppStore.token}")
|
requestBuilder.addHeader("Authorization", "Bearer ${AppStore.token}")
|
||||||
|
requestBuilder.addHeader("DEVICE-OS", "Android")
|
||||||
|
|
||||||
val response = chain.proceed(requestBuilder.build())
|
val response = chain.proceed(requestBuilder.build())
|
||||||
return response
|
return response
|
||||||
|
|||||||
@@ -18,13 +18,7 @@ import com.aiosman.ravenow.data.AccountService
|
|||||||
import com.aiosman.ravenow.data.AccountServiceImpl
|
import com.aiosman.ravenow.data.AccountServiceImpl
|
||||||
import com.aiosman.ravenow.data.UserService
|
import com.aiosman.ravenow.data.UserService
|
||||||
import com.aiosman.ravenow.data.UserServiceImpl
|
import com.aiosman.ravenow.data.UserServiceImpl
|
||||||
import com.aiosman.ravenow.entity.CommentEntity
|
|
||||||
import com.aiosman.ravenow.exp.formatChatTime
|
|
||||||
import com.aiosman.ravenow.ui.NavigationRoute
|
|
||||||
import com.aiosman.ravenow.ui.navigateToChat
|
|
||||||
import com.aiosman.ravenow.utils.TrtcHelper
|
|
||||||
// 临时兼容层 - TODO: 完成 OpenIM 迁移后删除
|
|
||||||
import com.aiosman.ravenow.compat.*
|
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ animation = "1.7.0-beta05"
|
|||||||
coil = "2.7.0"
|
coil = "2.7.0"
|
||||||
composeImageBlurhash = "3.0.2"
|
composeImageBlurhash = "3.0.2"
|
||||||
converterGson = "2.11.0"
|
converterGson = "2.11.0"
|
||||||
coreSdk = "3.8.3"
|
imSdk = "3.8.3"
|
||||||
|
imcoreSdk = "3.8.3"
|
||||||
coreSplashscreen = "1.0.1"
|
coreSplashscreen = "1.0.1"
|
||||||
credentialsPlayServicesAuth = "1.2.2"
|
credentialsPlayServicesAuth = "1.2.2"
|
||||||
eventbus = "3.3.1"
|
eventbus = "3.3.1"
|
||||||
@@ -42,7 +43,6 @@ zoomable = "1.6.1"
|
|||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanistSystemuicontroller" }
|
accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanistSystemuicontroller" }
|
||||||
im-sdk = { module = "io.openim:android-sdk", version.ref = "coreSdk" }
|
|
||||||
androidx-animation = { module = "androidx.compose.animation:animation", version.ref = "animation" }
|
androidx-animation = { module = "androidx.compose.animation:animation", version.ref = "animation" }
|
||||||
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||||
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" }
|
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" }
|
||||||
@@ -60,7 +60,6 @@ coil = { module = "io.coil-kt:coil", version.ref = "coil" }
|
|||||||
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
|
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
|
||||||
compose-image-blurhash = { module = "com.github.orlando-dev-code:compose-image-blurhash", version.ref = "composeImageBlurhash" }
|
compose-image-blurhash = { module = "com.github.orlando-dev-code:compose-image-blurhash", version.ref = "composeImageBlurhash" }
|
||||||
converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "converterGson" }
|
converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "converterGson" }
|
||||||
im-core-sdk = { module = "io.openim:core-sdk", version.ref = "coreSdk" }
|
|
||||||
eventbus = { module = "org.greenrobot:eventbus", version.ref = "eventbus" }
|
eventbus = { module = "org.greenrobot:eventbus", version.ref = "eventbus" }
|
||||||
firebase-analytics = { module = "com.google.firebase:firebase-analytics" }
|
firebase-analytics = { module = "com.google.firebase:firebase-analytics" }
|
||||||
firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebaseBom" }
|
firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebaseBom" }
|
||||||
@@ -84,6 +83,8 @@ androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-man
|
|||||||
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
|
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
|
||||||
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
|
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
|
||||||
androidx-material3-android = { group = "androidx.compose.material3", name = "material3-android", version.ref = "material3Android" }
|
androidx-material3-android = { group = "androidx.compose.material3", name = "material3-android", version.ref = "material3Android" }
|
||||||
|
im-sdk = { module = "io.openim:android-sdk", version.ref = "imSdk" }
|
||||||
|
im-core-sdk = { module = "io.openim:core-sdk", version.ref = "imcoreSdk" }
|
||||||
jwtdecode = { module = "com.auth0.android:jwtdecode", version.ref = "jwtdecode" }
|
jwtdecode = { module = "com.auth0.android:jwtdecode", version.ref = "jwtdecode" }
|
||||||
kotlin-faker = { module = "io.github.serpro69:kotlin-faker", version.ref = "kotlinFaker" }
|
kotlin-faker = { module = "io.github.serpro69:kotlin-faker", version.ref = "kotlinFaker" }
|
||||||
maps-compose = { module = "com.google.maps.android:maps-compose", version.ref = "mapsCompose" }
|
maps-compose = { module = "com.google.maps.android:maps-compose", version.ref = "mapsCompose" }
|
||||||
|
|||||||
Reference in New Issue
Block a user