I want to display light when notification fires in android
i have try with below code but the screen not displays light
if(isBlink) {
notification.ledOffMS=25;
notification.ledOnMS=开发者_开发技巧100;
notification.ledARGB=Color.RED;
notification.flags=notification.flags|Notification.FLAG_SHOW_LIGHTS;
}
I am not sure about your code and logic inside. But following questions may help you to debug.
How do you trigger isBlink ? Is this through some signal handler ?
How notification parameters gets acknowledged once set ? I suppose you are using some timer or loop logic.
Try to receive this notification with the screen off.. I think google have this requirement to show lights on the led.
精彩评论