See Android source for an answer:
<color name="config_defaultNotificationColor">#ffffffff</color> <integer name="config_defaultNotificationLedOn">500</integer> <integer name="config_defaultNotificationLedOff">2000</integer>
However, for different ROMs there may be different values. For example, my returns 5000 for config_defaultNotificationLedOff . Therefore, you might want to get them at runtime:
Resources resources = context.getResources(), systemResources = Resources.getSystem(); notificationBuilder.setLights( ContextCompat.getColor(context, systemResources .getIdentifier("config_defaultNotificationColor", "color", "android")), resources.getInteger(systemResources .getIdentifier("config_defaultNotificationLedOn", "integer", "android")), resources.getInteger(systemResources .getIdentifier("config_defaultNotificationLedOff", "integer", "android")));
According to diff , these attributes are guaranteed to exist on Android 2.2+ (API level 8 +).
Mygod
source share