Can I detect the presence/absence of 'LED notification' on an Android device?

穿精又带淫゛_ 提交于 2020-01-01 04:17:11

问题


Background: I have an app with notifications and I want to support LED notifications (and it's working perfectly). In my preferences, I allow the user to customize the LED notifications.

Problem: I don't want to show the LED customization options if the device doesn't support them because it can possibly confuse the user (If all you've had were cheap Androids, you have no idea what LED notification is). Is there an API that I can use to detect if the device supports it?

if there is an 'old' and a 'new' way, I'd probably prefer the old way as my lowest supported API level is 4.

Thanks

LED notification: If enabled, your phone's LED will blink for notifications when your display is off.


回答1:


Is there an API that I can use to detect if the device supports it?

Alas, no, there is no API for this.



来源:https://stackoverflow.com/questions/5997692/can-i-detect-the-presence-absence-of-led-notification-on-an-android-device

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