Set message notification accent color to colorPrimary
This commit is contained in:
@@ -12,6 +12,7 @@ import android.os.IBinder;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.RequiresApi;
|
import androidx.annotation.RequiresApi;
|
||||||
import androidx.core.app.NotificationCompat;
|
import androidx.core.app.NotificationCompat;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
import com.github.gotify.MissedMessageUtil;
|
import com.github.gotify.MissedMessageUtil;
|
||||||
import com.github.gotify.NotificationSupport;
|
import com.github.gotify.NotificationSupport;
|
||||||
import com.github.gotify.R;
|
import com.github.gotify.R;
|
||||||
@@ -191,6 +192,7 @@ public class WebSocketService extends Service {
|
|||||||
.setStyle(new NotificationCompat.BigTextStyle().bigText(message))
|
.setStyle(new NotificationCompat.BigTextStyle().bigText(message))
|
||||||
.setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND)
|
.setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND)
|
||||||
.setLights(Color.CYAN, 1000, 5000)
|
.setLights(Color.CYAN, 1000, 5000)
|
||||||
|
.setColor(ContextCompat.getColor(getApplicationContext(), R.color.colorPrimary))
|
||||||
.setContentIntent(contentIntent);
|
.setContentIntent(contentIntent);
|
||||||
|
|
||||||
NotificationManager notificationManager =
|
NotificationManager notificationManager =
|
||||||
@@ -216,6 +218,7 @@ public class WebSocketService extends Service {
|
|||||||
.setContentTitle(getString(R.string.grouped_notification_text))
|
.setContentTitle(getString(R.string.grouped_notification_text))
|
||||||
.setGroupSummary(true)
|
.setGroupSummary(true)
|
||||||
.setContentText(getString(R.string.grouped_notification_text))
|
.setContentText(getString(R.string.grouped_notification_text))
|
||||||
|
.setColor(ContextCompat.getColor(getApplicationContext(), R.color.colorPrimary))
|
||||||
.setContentIntent(contentIntent);
|
.setContentIntent(contentIntent);
|
||||||
|
|
||||||
NotificationManager notificationManager =
|
NotificationManager notificationManager =
|
||||||
|
|||||||
Reference in New Issue
Block a user