Disable/enable notification led

帅比萌擦擦* 提交于 2019-12-17 19:05:00

问题


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



来源:https://stackoverflow.com/questions/3304971/disable-enable-notification-led

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!