我可以在Android设备上检测是否存在"LED通知"吗? [英] Can I detect the presence/absence of 'LED notification' on an Android device?

查看:87
本文介绍了我可以在Android设备上检测是否存在"LED通知"吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:我有一个带有通知的应用程序,我想支持LED通知(它运行良好).根据我的喜好,我允许用户自定义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.

问题:如果设备不支持这些选项,我不想显示LED定制选项,因为它可能会使用户感到困惑(如果您所拥有的只是廉价的Android,那么您根本不知道什么是LED通知).有没有可以用来检测设备是否支持的API?

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?

如果有旧"方法和新"方法,我可能更喜欢旧方法,因为我支持的最低API级别为4.

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

谢谢

LED通知:如果启用,则在显示屏关闭时,手机的LED会闪烁以发出通知.

推荐答案

有没有可以用来检测设备是否支持的API?

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

A,不,没有API.

Alas, no, there is no API for this.

这篇关于我可以在Android设备上检测是否存在"LED通知"吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆