add mobile androida and ios apps

This commit is contained in:
2026-05-18 22:30:45 +02:00
parent 0e40a23828
commit 6146bf18b0
32 changed files with 1594 additions and 0 deletions
@@ -0,0 +1,32 @@
package com.groove.audio
import android.content.Context
import androidx.media3.common.util.UnstableApi
@UnstableApi
class AppSettings(private val context: Context) {
private val prefs = context.getSharedPreferences("groove", Context.MODE_PRIVATE)
var host: String
get() = prefs.getString("host", "192.168.178.100") ?: "192.168.178.100"
set(value) {
prefs.edit().putString("host", value).apply()
}
var password: String
get() = prefs.getString("password", "groove_listen") ?: "groove_listen"
set(value) {
prefs.edit().putString("password", value).apply()
}
companion object {
@Volatile
private var instance: AppSettings? = null
fun getInstance(context: Context): AppSettings {
return instance ?: synchronized(this) {
instance ?: AppSettings(context).also { instance = it }
}
}
}
}