Disable/enable notification led

2019-01-18 07:59发布

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.

标签: android led
2条回答
兄弟一词,经得起流年.
2楼-- · 2019-01-18 08:22

Yea sure there is a way...

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

1 - indicate on state 0 - indicate off state

查看更多
Luminary・发光体
3楼-- · 2019-01-18 08:32

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

查看更多
登录 后发表回答