I know others have posted with this general problem, but I've read the
Android developer page on the topic, as well as several forum and blog
posts (such as 
http://androidblogger.blogspot.com/2009/09/tutorial-how-to-use-led-with-android.html),
and no matter what I do, the LED light will not blink.

I've tried it with DEFAULT_LIGHTS:

String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager)
getSystemService(ns);
int icon = R.drawable.icon;
CharSequence tickerText = "Test 1";
long when = System.currentTimeMillis();
...
Notification notification = new Notification(icon, tickerText, when);
notification.defaults |= Notification.DEFAULT_LIGHTS;
final int HELLO_ID = 1;
mNotificationManager.notify(HELLO_ID, notification);

...and with custom lighting settings:

String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager)
getSystemService(ns);
int icon = R.drawable.icon;
CharSequence tickerText = "Test 2";
long when = System.currentTimeMillis();
Notification notification = new Notification(icon, tickerText, when);
...
notification.ledARGB = 0xff00ff00;
notification.ledOnMS = 300;
notification.ledOffMS = 1000;
notification.flags |= Notification.FLAG_SHOW_LIGHTS;
final int HELLO_ID = 1;
mNotificationManager.notify(HELLO_ID, notification);

...but nothing happens (no error and no light).  I can get the same
notification to play the default notification sound and to vibrate the
phone, but the LED simply won't work (and I know the light physically
works, as I see it flash for email and such).

I thought perhaps it might be a color issue, but I've tried a few
color values with no luck.

I'm pretty much looking for any sort of suggestions, whether they be
color values worth trying or any sample code from anyone who's
successfully done LED notifications on a Motorola Droid running 2.1 or
higher (I noticed one or two posts referenced some sort of bug with
LED notifications on the Droid but no details were provided).

I will also mention (in case it's relevant, though I doubt that it is)
that I am defining a custom layout for my notifications.

Thanks.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to