- Update mBuilder in NotificationService.java to ensure that the led is displayed at the right color.

CF: http://stackoverflow.com/questions/14953793/android-notification-led-doesnt-use-my-color#comment20991762_14953793
- Changed led Color to green to remember the icon color and led times
This commit is contained in:
Quentin 2015-02-27 00:33:49 +01:00
parent a022e4b41a
commit 71ce73a271

View file

@ -211,9 +211,10 @@ public class NotificationService {
mBuilder.setCategory(Notification.CATEGORY_MESSAGE); mBuilder.setCategory(Notification.CATEGORY_MESSAGE);
} }
setNotificationColor(mBuilder); setNotificationColor(mBuilder);
mBuilder.setDefaults(0);
mBuilder.setSmallIcon(R.drawable.ic_notification); mBuilder.setSmallIcon(R.drawable.ic_notification);
mBuilder.setDeleteIntent(createDeleteIntent()); mBuilder.setDeleteIntent(createDeleteIntent());
mBuilder.setLights(0xffffffff, 2000, 4000); mBuilder.setLights(0xff00ff00, 500, 1500);
final Notification notification = mBuilder.build(); final Notification notification = mBuilder.build();
notificationManager.notify(NOTIFICATION_ID, notification); notificationManager.notify(NOTIFICATION_ID, notification);
} }