diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9b4acfd..47308d4 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -9,12 +9,12 @@ android { namespace = "com.casic.br.operationsite" - compileSdk = 36 + compileSdk = 35 defaultConfig { applicationId = "com.casic.br.operationsite" minSdk = 26 - targetSdk = 36 + targetSdk = 35 versionCode = 1090 versionName = "1.0.9.0" } @@ -71,7 +71,7 @@ dependencies { //基础依赖库 implementation("com.github.AndroidCoderPeng:Kotlin-lite-lib:1.1.4") - implementation("androidx.core:core-ktx:1.13.0") + implementation("androidx.core:core-ktx:1.13.1") implementation("androidx.appcompat:appcompat:1.7.0") implementation("com.google.android.material:material:1.10.0") //Google官方授权框架 @@ -119,12 +119,8 @@ implementation("io.netty:netty-all:4.1.23.Final") //WebView implementation("com.just.agentweb:agentweb-androidx:4.1.4") - //视频播放器,RTSP流 - implementation("com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v8.4.0-release-jitpack") - //是否需要ExoPlayer模式 - implementation("com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer-exo2:v8.4.0-release-jitpack") - //更多ijk的编码支持 - implementation("com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-ex_so:v8.4.0-release-jitpack") + //视频播放 + implementation("com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer:v10.0.0") //大图 implementation("com.github.chrisbanes:PhotoView:2.3.0") //扫码 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9b4acfd..47308d4 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -9,12 +9,12 @@ android { namespace = "com.casic.br.operationsite" - compileSdk = 36 + compileSdk = 35 defaultConfig { applicationId = "com.casic.br.operationsite" minSdk = 26 - targetSdk = 36 + targetSdk = 35 versionCode = 1090 versionName = "1.0.9.0" } @@ -71,7 +71,7 @@ dependencies { //基础依赖库 implementation("com.github.AndroidCoderPeng:Kotlin-lite-lib:1.1.4") - implementation("androidx.core:core-ktx:1.13.0") + implementation("androidx.core:core-ktx:1.13.1") implementation("androidx.appcompat:appcompat:1.7.0") implementation("com.google.android.material:material:1.10.0") //Google官方授权框架 @@ -119,12 +119,8 @@ implementation("io.netty:netty-all:4.1.23.Final") //WebView implementation("com.just.agentweb:agentweb-androidx:4.1.4") - //视频播放器,RTSP流 - implementation("com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v8.4.0-release-jitpack") - //是否需要ExoPlayer模式 - implementation("com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer-exo2:v8.4.0-release-jitpack") - //更多ijk的编码支持 - implementation("com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-ex_so:v8.4.0-release-jitpack") + //视频播放 + implementation("com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer:v10.0.0") //大图 implementation("com.github.chrisbanes:PhotoView:2.3.0") //扫码 diff --git a/app/src/main/java/com/casic/br/operationsite/view/DeviceControlActivity.kt b/app/src/main/java/com/casic/br/operationsite/view/DeviceControlActivity.kt index 79bf1af..99b5c4e 100644 --- a/app/src/main/java/com/casic/br/operationsite/view/DeviceControlActivity.kt +++ b/app/src/main/java/com/casic/br/operationsite/view/DeviceControlActivity.kt @@ -43,9 +43,9 @@ lateinit var weakReferenceHandler: WeakReferenceHandler } - private val kTag = "DeviceControlActivity" private val context = this private val fragmentPages by lazy { ArrayList() } + private val socketService by lazy { Intent(this, SocketConnectionService::class.java) } private val pageTitles = arrayOf("相机控制", "激光监测", "语音设置", "基础配置") private val options = arrayListOf("修改安全树视频相机IP地址", "修改安全树数据通信IP地址") private var isRtspPlaying = false @@ -80,7 +80,7 @@ override fun initOnCreate(savedInstanceState: Bundle?) { ActivityStackManager.addActivity(this) - startService(Intent(this, SocketConnectionService::class.java)) + startService(socketService) startService(Intent(this, ForegroundRunningService::class.java)) weakReferenceHandler = WeakReferenceHandler(this) @@ -190,11 +190,11 @@ SaveKeyValues.putValue(LocaleConstant.SAFE_TREE_SOCKET_IP_KEY, value) //设置通信IP之后需要重启服务 lifecycleScope.launch(Dispatchers.IO) { - stopService(Intent(context, SocketConnectionService::class.java)) + stopService(socketService) delay(1000) - startService(Intent(context, SocketConnectionService::class.java)) + startService(socketService) } disconnectCurrentWiFi() } else { diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9b4acfd..47308d4 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -9,12 +9,12 @@ android { namespace = "com.casic.br.operationsite" - compileSdk = 36 + compileSdk = 35 defaultConfig { applicationId = "com.casic.br.operationsite" minSdk = 26 - targetSdk = 36 + targetSdk = 35 versionCode = 1090 versionName = "1.0.9.0" } @@ -71,7 +71,7 @@ dependencies { //基础依赖库 implementation("com.github.AndroidCoderPeng:Kotlin-lite-lib:1.1.4") - implementation("androidx.core:core-ktx:1.13.0") + implementation("androidx.core:core-ktx:1.13.1") implementation("androidx.appcompat:appcompat:1.7.0") implementation("com.google.android.material:material:1.10.0") //Google官方授权框架 @@ -119,12 +119,8 @@ implementation("io.netty:netty-all:4.1.23.Final") //WebView implementation("com.just.agentweb:agentweb-androidx:4.1.4") - //视频播放器,RTSP流 - implementation("com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v8.4.0-release-jitpack") - //是否需要ExoPlayer模式 - implementation("com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer-exo2:v8.4.0-release-jitpack") - //更多ijk的编码支持 - implementation("com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-ex_so:v8.4.0-release-jitpack") + //视频播放 + implementation("com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer:v10.0.0") //大图 implementation("com.github.chrisbanes:PhotoView:2.3.0") //扫码 diff --git a/app/src/main/java/com/casic/br/operationsite/view/DeviceControlActivity.kt b/app/src/main/java/com/casic/br/operationsite/view/DeviceControlActivity.kt index 79bf1af..99b5c4e 100644 --- a/app/src/main/java/com/casic/br/operationsite/view/DeviceControlActivity.kt +++ b/app/src/main/java/com/casic/br/operationsite/view/DeviceControlActivity.kt @@ -43,9 +43,9 @@ lateinit var weakReferenceHandler: WeakReferenceHandler } - private val kTag = "DeviceControlActivity" private val context = this private val fragmentPages by lazy { ArrayList() } + private val socketService by lazy { Intent(this, SocketConnectionService::class.java) } private val pageTitles = arrayOf("相机控制", "激光监测", "语音设置", "基础配置") private val options = arrayListOf("修改安全树视频相机IP地址", "修改安全树数据通信IP地址") private var isRtspPlaying = false @@ -80,7 +80,7 @@ override fun initOnCreate(savedInstanceState: Bundle?) { ActivityStackManager.addActivity(this) - startService(Intent(this, SocketConnectionService::class.java)) + startService(socketService) startService(Intent(this, ForegroundRunningService::class.java)) weakReferenceHandler = WeakReferenceHandler(this) @@ -190,11 +190,11 @@ SaveKeyValues.putValue(LocaleConstant.SAFE_TREE_SOCKET_IP_KEY, value) //设置通信IP之后需要重启服务 lifecycleScope.launch(Dispatchers.IO) { - stopService(Intent(context, SocketConnectionService::class.java)) + stopService(socketService) delay(1000) - startService(Intent(context, SocketConnectionService::class.java)) + startService(socketService) } disconnectCurrentWiFi() } else { diff --git a/build.gradle.kts b/build.gradle.kts index b12e2fc..8af745d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { id("com.android.application") version "8.1.0" apply false - id("org.jetbrains.kotlin.android") version "1.8.0" apply false + id("org.jetbrains.kotlin.android") version "2.0.21" apply false } \ No newline at end of file