Add LED light for message notifications

This commit is contained in:
schwma
2018-11-08 15:30:31 +01:00
committed by Jannis Mattheis
parent 6196626020
commit 9a1ffa91df
2 changed files with 5 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.os.IBinder;
import androidx.annotation.Nullable;
@@ -189,6 +190,7 @@ public class WebSocketService extends Service {
.setContentText(message)
.setStyle(new NotificationCompat.BigTextStyle().bigText(message))
.setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND)
.setLights(Color.CYAN, 1000, 5000)
.setContentIntent(contentIntent);
NotificationManager notificationManager =