Permanently enable and disable blinking LED notification light in android programmatically

烈酒焚心 提交于 2020-01-13 14:53:07

问题


I have been looking for the ability to disable and enable the LED notification light through code. I saw this thread Disable/enable notification led, but it is quite old and I was wondering if the new API versions has some support for turning it off completely.


回答1:


I was wondering if the new API versions has some support for turning it off completely

You cannot enable or disable the LED behavior through the Android SDK, except within your own app, where you control what any Notification does that you raise.




回答2:


You can only control the led if your app raies a notification when no other apps have raised a notifiction.

It is possible on some devices to bypass android and control it directly in unix shell, but this is obviously not recommended.



来源:https://stackoverflow.com/questions/10858465/permanently-enable-and-disable-blinking-led-notification-light-in-android-progra

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