Search code examples
androidnotificationsled

The android LED Color paradigm


So recently I was working a bug for LED notifications in our app. The bug report was specific to Galaxy S3 / S4 and Android 4.4, where our LED notification was not working. The user reported that other apps such as yahoo mail still are able to show the LED notification. It was also reported that the LED notifications work for the other apps while charging. Though I have never experienced LED notifications coming through while charging...

Also while reading the android doc I came across this statement - "Your notifications shouldn't use a different color unless the user has explicitly customized it."

http://developer.android.com/design/patterns/notifications.html

My thinking is that the reason for this is that some android devices have different color LED's and the LED notification may not display at all if the device doesn't support that LED color... For example my S2 only shows a blue LED color, while my HTC one shows, orange/red and green/yellow.

So the question is does anyone know if LED handling changed in android 4.4? The class we are using is the api 1 notification class, I've coded some examples using the NotificationCompat.Builder class and was able to get the LED to light up on 4.4 devices, but aside from how the notification is 'built' I see no different between the two?


Solution

  • For an unexplained reason using NotificationCompat.Builder to build the notification rather than using the api1 Notification class resolved the issue we had with some 4.3 and all 4.4 devices.