I am basically just experimenting with Android development, and a couple of days ago I came across this app called \"Go SMS Pro\", which, among other things, can set up noti
You can use this code:
private static final int LED_NOTIFICATION_ID= 0; //arbitrary constant
private void RedFlashLight() {
NotificationManager nm = (NotificationManager) getSystemService( NOTIFICATION_SERVICE);
Notification notif = new Notification();
notif.ledARGB = 0xFFff0000;
notif.flags = Notification.FLAG_SHOW_LIGHTS;
notif.ledOnMS = 100;
notif.ledOffMS = 100;
nm.notify(LED_NOTIFICATION_ID, notif);
}
Instead of using ARGB value as the example show, you can use int property inside android.graphics.Color
class to get the color as well (e.g. Color.WHITE)