我可以检测“LED 通知”是否存在吗?在 Android 设备上?
背景:我有一个带有通知的应用程序,我想支持 LED 通知(并且它运行良好)。在我的偏好中,我允许用户自定义 LED 通知。
问题:如果设备不支持 LED 自定义选项,我不想显示这些选项,因为这可能会让用户感到困惑(如果您拥有的只是廉价的 Android 设备,那么您不知道 LED 通知是什么)。有没有可以用来检测设备是否支持的 API?
如果有“旧”和“新”方式,我可能更喜欢旧方式,因为我支持的最低 API 级别是 4。
感谢
LED 通知:如果启用,当您显示已关闭。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
唉,不,没有这方面的 API。
Alas, no, there is no API for this.