AutoJs6 icon indicating copy to clipboard operation
AutoJs6 copied to clipboard

忽略电池优化不生效

Open msccreater opened this issue 2 years ago • 2 comments

已经设置成忽略电池优化,但是选项没有勾选,设备小米11Pro

msccreater avatar Aug 17 '23 06:08 msccreater

目前网上能查到的方法, 都是目前 AutoJs6 一直沿用的方法 (使用 ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS).

我不知道小米设备现在的忽略电池优化页面是什么样的, 是否也是有三个选项:

J7fsa-1

PS: 这个页面我没找到直接跳转的代码方式.

SuperMonster003 avatar Nov 02 '23 05:11 SuperMonster003

Intent intent = new Intent();
intent.setComponent(new ComponentName(
           "com.miui.powerkeeper",
           "com.miui.powerkeeper.ui.HiddenAppsContainerManagementActivity"));
startActivity(intent);

网上找到了一种针对小米设备的跳转方式, 但我没有测试设备, 不知道具体作用是什么, 你可以参考着尝试一下.

SuperMonster003 avatar Nov 02 '23 05:11 SuperMonster003