How to programmatically detect SONY - Stamina device energy profile is ON

二次信任 提交于 2019-12-04 02:56:57

Currently, there is no official way to detect if the STAMINA energy profile is selected. However, if there is enough community demand we may be able to open this up.

You could check it via

Settings.Secure.getInt(contentResolver, "somc.stamina_mode", 0) == 1

Works at least on the Sony Xperia XZ1 Compact (8.0.0)

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