android-intent - Intent to Battery Launch 部分在华为与奥利奥
问题描述
我需要将使用 Android 8“奥利奥”的华为用户重定向到新部分设置 -> 电池 -> 启动
任何人都知道如何构建意图或我可以在哪里找到创建它的信息(包和类)?
解决方案
我遇到了同样的问题并使用可访问性我尝试让类名或活动名称传递意图并打开设置->电池->启动
在奥利奥华为荣耀 9 Lite 上测试:
Intent intent = new Intent();
intent.setClassName("com.huawei.systemmanager", "com.huawei.systemmanager.appcontrol.activity.StartupAppControlActivity");
startActivity(intent);
它有点晚了,但也许可以帮助某人并节省时间。
推荐阅读
- entity-framework - 无法将类型 'TestLinq.UserData' 转换为 T'estLinq.userData'
- json - MissingRefError - 使用 $ref 的 json 架构远程 REST Web 服务枚举无法解析对远程 json 的引用
- aiml - 使用
和 在目标 - java - Spring 中的 404 错误(java config / no web.xml)
- java - 如何使用 Java 飞碟将现有 PDF 附加到生成的 PDF
- node.js - NodeJS PUT 请求返回错误 400(错误请求)
- python-3.x - 'spaceship' 类未定义(即使我已导入它?)
- c++ - 将结构向量推入结构?
- php - sql查询后仅将某些字段添加到数组
- django - Django - 计算模型中的外键