Detecting Android L Battery Saver

主宰稳场 提交于 2019-12-03 06:16:49

android.os.PowerManager has a new method, boolean isPowerSaveMode(). You can download the preview SDK docs at http://developer.android.com/preview/reference.html to see the new APIs.

There's also a broadcast intent ACTION_POWER_SAVE_MODE_CHANGED when this changes.

You might also want to look into the JobScheduler API as this allows you to easily run tasks and only have them execute when there is a sufficient power or a network connection for instance.

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