2

Is it possible to programmatically disable and enable the led indicator light on an Android device? I am not referring to just turning it on and off as in a notification. I did not see anything in the api that would do so. I am guessing this is hardware specific if it is possible at all.

THelper
  • 14,855
  • 6
  • 61
  • 97
JDM
  • 9,797
  • 4
  • 21
  • 22

2 Answers2

9

Yea sure there is a way...

android.provider.Settings.System.putInt(getContentResolver(), "notification_light_pulse", 1);

1 - indicate on state 0 - indicate off state

Sudheesh VS
  • 257
  • 3
  • 4
4

I have not seen any APIs for dealing with the LEDs other than the Notification class.

CommonsWare
  • 954,112
  • 185
  • 2,315
  • 2,367
  • I don't believe there is anything in the Notification class that will allow you to disable the led or am I missing something? – JDM Jul 22 '10 at 01:46
  • 1
    @martinjd: Correct. Hence, I do not think there are any APIs in Android that let you disable the LEDs. I apologize for not making that clearer in my original answer. – CommonsWare Jul 22 '10 at 01:52