Android的省电模式监听? [英] Android power save mode listener?
问题描述
如何能在Android监听器创建刚进入节电模式启动前执行任务?另外:有一些,可以通过这个任务要控制的低功率选择什么
?
如何能在Android监听器创建刚进入节电模式启动前执行任务?
块引用>有没有广播
意图
这一点。最接近的是ACTION_SCREEN_OFF
。该设备可能会睡着在不久的将来您会收到该广播后。而且,您可以只用听这个广播一个广播接收器
通过registerReceiver()
在活动或服务或者其他注册上下文
。
另外:是一些可以通过这个任务要控制的低功率选择什么
?
块引用>我不知道这意味着什么,对不起。
How can an Android listener be created to perform a task just before entering power save mode? Also: what are some of the low power options that can be controlled by this task?
解决方案How can an Android listener be created to perform a task just before entering power save mode?
There is no broadcast
Intent
for this. The closest isACTION_SCREEN_OFF
. The device will likely fall asleep in the near future after you receive this broadcast. And, you can only listen for this broadcast using aBroadcastReceiver
registered viaregisterReceiver()
in an activity or service or otherContext
.Also: what are some of the low power options that can be controlled by this task?
I have no idea what this means, sorry.
这篇关于Android的省电模式监听?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!