I am trying to use a notification that also uses the notification LED on my S3, but for some reason the color will always be blue (I assume this is the default value?). I tried to use different colors, but nothing has changed. Other applications (such as Whatsapp, Gmail and Facebook do not have problems displaying a different color).
Notification.Builder noteBuilder = new Notification.Builder(context) .setAutoCancel(true) .setPriority(Notification.PRIORITY_DEFAULT) .setSmallIcon(R.drawable.ic_launcher) .setContentTitle(ContentTitle) .setContentText(ContentText) .setLights(Color.YELLOW, 500, 500) ; Intent noteIntent = new Intent(context,HoofdScherm.class); PendingIntent notePendingIntent = PendingIntent.getActivity(context, 0, noteIntent, PendingIntent.FLAG_CANCEL_CURRENT); noteBuilder.setContentIntent(notePendingIntent); Notification note = noteBuilder.build(); note.ledARGB = Color.YELLOW; NotificationManager mgr = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE); mgr.notify(0,note);
android notifications led
Luc kolen
source share