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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I have not seen any APIs for dealing with the LEDs other than the Notification
class.
回答2:
Yea sure there is a way...
android.provider.Settings.System.putInt(getContentResolver(), "notification_light_pulse", 1);
1 - indicate on state 0 - indicate off state