android的LED灯是通过通知来调用的,只是通知类的一个参数,具体大体实现方法如下:
final int ID_LED=19871103;
NotificationManager nm=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
Notification notification = new Notification();
notification.ledARGB = 0xFFFFFF; //这里是颜色,咱们可以尝试改变,理论上0xFF0000是红色,0x00FF00是绿色
notification.ledOnMS = 100;
notification.ledOffMS = 100;
notification.flags = Notification.FLAG_SHOW_LIGHTS;
nm.notify(ID_LED, notification);
nm.cancel(ID_LED);