app/src/main/java/com/example/jarvis_stts/JarvisService.kt aktualisiert
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user