您可以手动触发ACTION_BATTERY_LOW吗? [英] Can you manually fire ACTION_BATTERY_LOW?

查看:165
本文介绍了您可以手动触发ACTION_BATTERY_LOW吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对android编程比较陌生,但是我被告知大多数应用程序都有一个接收器,当android触发ACTION_BATTERY_LOW时,它将减少耗电量大的活动.

I'm relatively new to android programming but I'm told most applications have a receiver that will cut down on battery expensive activities when android fires ACTION_BATTERY_LOW.

Android开发页面显示: 公共静态最终字符串ACTION_BATTERY_LOW

Android developing page says: public static final String ACTION_BATTERY_LOW

在API级别1中添加 广播操作:指示设备的电池电量不足.该广播对应于电池电量不足警告"系统对话框.

Added in API level 1 Broadcast Action: Indicates low battery condition on the device. This broadcast corresponds to the "Low battery warning" system dialog.

这是受保护的意图,只能由系统发送.

常量值:"android.intent.action.BATTERY_LOW"

Constant Value: "android.intent.action.BATTERY_LOW"

我想知道是否有一种方法可以在任何所需的电池电量水平下手动发送此意图.我有一个植根的设备,如果有帮助的话.

I was wondering if there was a way to send this intent manually, at any desired battery level. I have a rooted device if that makes a difference.

推荐答案

否.这是不可能的.查看这篇文章.查看Mark(commonsware)给出的答案.

No. It's not possible. Check this post. Look into the answer given by Mark(commonsware).

这篇关于您可以手动触发ACTION_BATTERY_LOW吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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