gpt4 book ai didi

android - 如何以编程方式从设置中获取默认屏幕超时时间?

转载 作者:行者123 更新时间:2023-11-29 15:38:55 26 4
gpt4 key购买 nike

我想以编程方式获取默认屏幕超时。

我知道如何使用以下代码以编程方式设置屏幕超时。

android.provider.Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_OFF_TIMEOUT, <Value for Timeout>);

但我无法从设置中获取默认屏幕超时。 enter image description here

最佳答案

为此你需要使用 getInt()

Settings.System.getInt(getContentResolver(),
Settings.System.SCREEN_OFF_TIMEOUT))

Reference

关于android - 如何以编程方式从设置中获取默认屏幕超时时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44691810/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com