Many Android phones are equipped with LED lights, such as HTC's phone charging, new text messages, and so will have a response to the instructions, in fact very simple this is notificationmanager some of the parameters, Below Android123 to everyone to say how to control the flashing of LED lights through code, because some models do not have LED lights or color types less, the need for real machine observation.
Copy Code code as follows:
final int id_led=19871103;
Notificationmanager nm= (Notificationmanager) Getsystemservice (Notification_service);
Notification Notification = new Notification ();
Notification.ledargb = 0xFFFFFF; Here is the color, we can try to change, theoretically 0xff0000 is red, 0x00ff00 is green
NOTIFICATION.LEDONMS = 100;
NOTIFICATION.LEDOFFMS = 100;
Notification.flags = notification.flag_show_lights;
Nm.notify (id_led, notification);
Nm.cancel (id_led);