Many Android mobile phones are equipped with LED lights. For example, HTC mobile phones provide response instructions when charging and sending new text messages. In fact, they are very simple parameters of icationicationmanager, next, Android123 will show you how to use the code to control the flashing of LED lights. Because some models do not have LED lights or have a small number of color types, you need to observe them when releasing them.
Copy codeThe Code is as follows: final int ID_LED = 19871103;
Icationicationmanager nm = (NotificationManager) getSystemService (NOTIFICATION_SERVICE );
Notification notification = new Notification ();
Notification. ledARGB = 0 xFFFFFF; // here is the color. We can try to change it. In theory, 0xFF0000 is red and 0x00FF00 is green.
Notification. ledOnMS = 100;
Notification. ledOffMS = 100;
Notification. flags = Notification. FLAG_SHOW_LIGHTS;
Nm. Y (ID_LED, notification );
Nm. cancel (ID_LED );