Android的省电模式监听? [英] Android power save mode listener?

查看:443
本文介绍了Android的省电模式监听?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何能在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 is ACTION_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 a BroadcastReceiver registered via registerReceiver() in an activity or service or other Context.

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屋!

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