app/src/main/java/com/example/jarvis_stts/JarvisService.kt aktualisiert

This commit is contained in:
2026-03-13 13:39:15 +00:00
parent b2e9866b78
commit dca5e0f00f

View File

@@ -38,11 +38,11 @@ class JarvisService : Service(), RecognitionListener {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
startForeground(
1,
createNotification("J.A.R.V.I.S. hört zu..."),
createNotification("JARVIS hört zu..."),
ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE
)
} else {
startForeground(1, createNotification("J.A.R.V.I.S. hört zu..."))
startForeground(1, createNotification("JARVIS hört zu..."))
}
initVosk()
@@ -61,7 +61,7 @@ class JarvisService : Service(), RecognitionListener {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel = NotificationChannel(
CHANNEL_ID,
"J.A.R.V.I.S. Background Service",
"JARVIS Background Service",
NotificationManager.IMPORTANCE_LOW
)
val manager = getSystemService(NotificationManager::class.java)
@@ -76,7 +76,7 @@ class JarvisService : Service(), RecognitionListener {
)
return NotificationCompat.Builder(this, CHANNEL_ID)
.setContentTitle("J.A.R.V.I.S. ist aktiv")
.setContentTitle("JARVIS ist aktiv")
.setContentText(text)
.setSmallIcon(android.R.drawable.ic_btn_speak_now) // Standard Android Icon
.setContentIntent(pendingIntent)