javaandroidnotificationsnexus-one

Notification LED - color


I'm trying to experiment with LED colors on my Nexus One and i'm having problems with creating any LED-light (color) with notification. LED-light isn't working. I have tested hardware malfunction and that isn't the problem. Here is the code.

    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);

Can somebody tell me what am I doing wrong? Tnx.


Solution

  • The problem is that notification light isn't shown until mobile phone goes dark (screen turns off). Everything else (including code) is OK.