通知LED - 颜色

Ant*_*nte 3 java notifications android nexus-one

我正在尝试在我的Nexus One上试验LED颜色,我在创建任何带有通知的LED灯(颜色)方面遇到了问题.LED灯不工作.我测试了硬件故障,这不是问题.这是代码.

    Notification notification = new Notification(R.drawable.icon, tickerText, System.currentTimeMillis());

    notification.ledARGB = Color.WHITE;
    notification.ledOnMS = 300;
    notification.ledOffMS = 1000;
    notification.flags = Notification.FLAG_SHOW_LIGHTS | Notification.FLAG_AUTO_CANCEL;
    //notification.defaults = Notification.DEFAULT_ALL;

    notification.setLatestEventInfo(this, getText(R.string.tekst1),
                   text, makeIntent(R.drawable.icon));

    notificationManager.notify(R.layout.main, notification);
Run Code Online (Sandbox Code Playgroud)

谁能告诉我我做错了什么?TNX.

Ant*_*nte 7

问题是在手机变暗(屏幕关闭)之前不会显示通知灯.其他一切(包括代码)都可以.

  • 一个5岁的帖子你刚刚解决了一个拼写错误....好的奉献精神...... (2认同)