在Android的省电模式控制编程?省电、模式、Android

2023-09-07 23:24:32 作者:鹤归

是否有可能把从code /关闭省电模式?

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

有关目前,我做wakelock获取和释放,但我相信,这是不一样的。

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

推荐答案

有没有任何公开的API的做到这一点的SDK。您可以使用 PowerManager的,以获取和释放wakelocks,但仅此而已。此外,每一个制造商和设备可能有它自己的版本是什么意思的省电模式,所以它没有任何意义给第三方应用程序开发人员的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.