开发者

Display light on Notification fired

开发者 https://www.devze.com 2023-02-28 01:47 出处:网络
I want to display light when notification fires in android i have try with below code but the screen not displays light

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.

  1. How do you trigger isBlink ? Is this through some signal handler ?

  2. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消