AutoJs6 icon indicating copy to clipboard operation
AutoJs6 copied to clipboard

使用打包的APP运行时,如果APP长时间处于后台,过阵子会程序堵塞不执行,直到再次打开APP到前台

Open dasorb opened this issue 8 months ago • 0 comments

版本: 6.6.3 手机品牌:vivo 安卓版本:9

ui.openLife.on("check", function(checked) {
    lifeRunning = checked;
    log("信息", "保活状态: " + (lifeRunning ? "开启" : "关闭"));
    // 保活检测
    lifeThread = threads.start(function() {
        if (lifeRunning) {
            // 保活检测
            while (lifeRunning) {
                sleep(10000);
                if (! taskRunning) {
                    toastLog("保活检测");
                }
            }
        }
    }); 
});

排除了脚本本身的问题:尝试换了隔壁的autox的最新版本,打包的应用在设置里会有一个使用前台服务使应用保持运行,开着就没问题了

dasorb avatar May 29 '25 08:05 dasorb