I want to control the LED on an Android device with more control than is offered by the Notification class. Notifications allow you to change the rate of flashing; e.g. 300 milliseconds on, 1000 milliseconds off, but that's it.
Essentially, I would like to turn the LED on and off at will at arbitrary times. Does anyone know if this is possible? The API does not seem to say so. Does it depend on the specific hardware?
I haven't tried this in code, but the SDK shows this:
And then you could use NotificationManager.cancel() to arbitrarily turn the notification off.
http://developer.android.com/reference/android/app/Notification.html#FLAG_SHOW_LIGHTS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With