Power saving mode in Android controlled programmatically?

南笙酒味 提交于 2019-12-20 05:22:12

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/18609978/power-saving-mode-in-android-controlled-programmatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!