【问题标题】:Disable/enable notification led禁用/启用通知 LED
【发布时间】:2010-07-22 00:40:51
【问题描述】:

是否可以通过编程方式禁用和启用 Android 设备上的 LED 指示灯?我不是指像通知中那样打开和关闭它。我在 api 中没有看到任何可以这样做的东西。如果可能的话,我猜这是特定于硬件的。

【问题讨论】:

    标签: android led


    【解决方案1】:

    当然有办法……

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

    1 - 指示状态 0 - 表示关闭状态

    【讨论】:

      【解决方案2】:

      除了Notification 类之外,我还没有看到任何用于处理 LED 的 API。

      【讨论】:

      • 我不相信 Notification 类中有任何东西可以让你禁用 LED 或者我错过了什么?
      • @martinjd:正确。因此,我认为 Android 中没有任何 API 可以让您禁用 LED。我很抱歉没有在我的原始答案中说得更清楚。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-09-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-12
      • 1970-01-01
      相关资源
      最近更新 更多