From 0c2620b79897d8ea8a0001fa70647b449018e2cf Mon Sep 17 00:00:00 2001 From: schwma <37244550+schwma@users.noreply.github.com> Date: Thu, 8 Nov 2018 15:36:48 +0100 Subject: [PATCH] Set message notification accent color to colorPrimary --- .../main/java/com/github/gotify/service/WebSocketService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/github/gotify/service/WebSocketService.java b/app/src/main/java/com/github/gotify/service/WebSocketService.java index 333e847..bd2888d 100644 --- a/app/src/main/java/com/github/gotify/service/WebSocketService.java +++ b/app/src/main/java/com/github/gotify/service/WebSocketService.java @@ -12,6 +12,7 @@ import android.os.IBinder; import androidx.annotation.Nullable; import androidx.annotation.RequiresApi; import androidx.core.app.NotificationCompat; +import androidx.core.content.ContextCompat; import com.github.gotify.MissedMessageUtil; import com.github.gotify.NotificationSupport; import com.github.gotify.R; @@ -191,6 +192,7 @@ public class WebSocketService extends Service { .setStyle(new NotificationCompat.BigTextStyle().bigText(message)) .setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND) .setLights(Color.CYAN, 1000, 5000) + .setColor(ContextCompat.getColor(getApplicationContext(), R.color.colorPrimary)) .setContentIntent(contentIntent); NotificationManager notificationManager = @@ -216,6 +218,7 @@ public class WebSocketService extends Service { .setContentTitle(getString(R.string.grouped_notification_text)) .setGroupSummary(true) .setContentText(getString(R.string.grouped_notification_text)) + .setColor(ContextCompat.getColor(getApplicationContext(), R.color.colorPrimary)) .setContentIntent(contentIntent); NotificationManager notificationManager =