Android中的省电模式以编程方式控制吗? [英] Power saving mode in Android controlled programmatically?

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

问题描述

是否可以通过代码打开/关闭省电模式?

Is it possible to turn ON/OFF power saving mode from code?

暂时,我进行唤醒锁的获取和释放,但是我认为那是不一样的.

For the time being, I do wakelock acquire and release, but I assume, that is not the same.

推荐答案

SDK中没有任何公开可用的API.您可以使用 PowerManager 来获取和释放唤醒锁,仅此而已.此外,每个制造商和设备都可能具有其自己的省电模式"含义,因此没有必要为第三方应用程序开发人员提供以这种方式与系统交互的API.

There aren't any publicly available API's to do this in the SDK. You can use the PowerManager to acquire and release wakelocks but that's about it. Besides, every manufacturer and device might have it's own version of what it means by "power saving mode", so it doesn't make sense to give 3rd party app developers an API to interact with the system in this way.

这篇关于Android中的省电模式以编程方式控制吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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