I\'m trying to turn the LED-flashing on for my activity in foreground, but it works only when the screen is off.
Is it possible to turn the LED on for active activit
At first Android LED indicator is very hardware dependent. Second - there is no API for managing LED instead of Notification
class with its FLAG_SHOW_LIGHTS
flag and several flags for managing flash duration and LED color which you use. Notification
is a message you can display to the user outside of your application's normal UI the primary purpose of LED indicator is to present additional notification information for the user when the screen is off. So the answer is definite NO. The LED will only start flashing if your screen is off and it’ll stop when you turn it back on. And there is no way to turn on and off LED when you want and to turn it when any of the application activities is in foreground, because it is managed by the OS internally.