开发者

Disable/enable notification led

开发者 https://www.devze.com 2023-01-08 02:57 出处:网络
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

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 开发者_C百科possible at all.


Yea sure there is a way...

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

1 - indicate on state

0 - indicate off state


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

0

精彩评论

暂无评论...
验证码 换一张
取 消