android - Android 中的睡眠模式激活和禁用
问题描述
我想在 android 中休眠设备,并在 5 分钟后激活设备,禁用休眠模式,当我尝试下面的代码时,它可以工作并使用下面的代码进入休眠模式
android.provider.Settings.System.putInt(context.getContentResolver(),Settings.System.SCREEN_OFF_TIMEOUT,miliseconds);
当我尝试禁用睡眠模式和操作设备时,它不会激活设备如何在 android 中激活和禁用睡眠模式?
android.provider.Settings.System.putInt(context.getContentResolver(),Settings.System.SCREEN_BRIGHTNESS,miliseconds);
解决方案
推荐阅读
- python - 蟒蛇处理。为什么背景(0,0,0)不会在我的形状上绘制?
- python - 为什么循环时程序中没有定义屏幕?
- java - Mockito 区分歧义 any() 集合与列表
- python - linux debian 9中thingsboard-gateway包安装程序的依赖问题
- vue.js - Vue:对 v-for 中输入数组的输入变化做出反应
- python - 在 tkinter 的弹出窗口中动态创建条目小部件时出现问题
- ruby-on-rails - rufus-scheduler 只用 puma 执行一次 rake 任务
- mysql - SQL 使用 csv 源路径创建表
- c++ - JsonCpp:如何将 unordered_map 转换为 Json::Value
- windows - 是否存在与 SID 1:1 映射的可读 Windows 用户帐户 ID?