The session moves from the connection screen's ViewModel into an app-wide SessionController, and a foreground service keeps the process running while connected: - Its notification shows the server and status and offers Mute, Deafen and Disconnect. - It declares microphone use only once the microphone is handed to the connection, as Android requires that permission to be granted then. - It holds a low-latency Wi-Fi lock and a CPU wake lock, since voice goes out every 20 ms. - When the system moves to another network, the session reconnects to where it was, as its socket stays bound to the old one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
57 lines
1.4 KiB
Plaintext
57 lines
1.4 KiB
Plaintext
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.compose)
|
|
}
|
|
|
|
android {
|
|
namespace = "com.ts3client.android"
|
|
compileSdk = 37
|
|
ndkVersion = "30.0.16248370"
|
|
|
|
defaultConfig {
|
|
applicationId = "com.ts3client.android"
|
|
minSdk = 33
|
|
targetSdk = 36
|
|
versionCode = 1
|
|
versionName = "0.1.0"
|
|
ndk {
|
|
abiFilters += listOf("arm64-v8a", "x86_64")
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
packaging {
|
|
resources {
|
|
// BouncyCastle ships Java 9+ module metadata Android has no use for.
|
|
excludes += "META-INF/versions/9/OSGI-INF/MANIFEST.MF"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":audio"))
|
|
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.compose.ui)
|
|
implementation(libs.androidx.compose.material3)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.lifecycle.runtime.compose)
|
|
implementation(libs.androidx.lifecycle.service)
|
|
}
|