覆盖现有的LED通知 [英] Overwrite existing LED notification

查看:141
本文介绍了覆盖现有的LED通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我投了LED通知这个直接的方式:

I cast an LED notification this straight forward way:

NotificationManager notifMgr = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); 
notifMgr.cancelAll();
Notification notif = new Notification();
notif.ledARGB = 0xff0000ff; 
notif.ledOnMS = 99999; 
notif.ledOffMS = 0; 
notif.flags |= Notification.FLAG_SHOW_LIGHTS;
notifMgr.notify(1234, notif);  

这让LED只是永久的淡蓝色。结果
如果在这种状态下,我收到例如谷歌通话信息,这是通知我覆盖LED状态,所以LED闪烁现在白(GTALK默认)。结果
如果现在我的程序创建另一个LED通知,由于某种原因,它不覆盖的gtalk LED通知,所以LED闪烁保持白色。

It let the LED just permanent light blue.
If, in that state, I receive for example a google talk message, it's notification overwrites my LED state, so the LED now blinks white (gtalk default).
If now my program creates another LED notification, for some reason it does not overwrite the gtalk LED notification, so the LED stays blinking white.

我怎样才能让我的通知覆盖其他LED notivications?显然,必须有一个办法,因为每增加一个覆盖LED我的状态。

How can I make my notification overwrite other LED notivications? Obviously there must be a way, since gtalk overwrites my LED state.

感谢您!

推荐答案

无论应用程序提出了一个通知,第一保持LED的控制,直到它通过应用程序或用户清除清除。

Whichever app raises the notification first keeps control of the led until it's cleared by that app or the user clearing it.

如果你是目前你描述听起来不正确的gtalk覆盖您的通知。我知道一点关于这个问题,我是lightflow

You description sounds incorrect of gtalk overriding your notification if yours is currently on. I know a little about this as I'm the author of "lightflow"

这篇关于覆盖现有的LED通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆