When I use launch to call another app, it shows that the jump is successful, but there is no jump in fact. When I set the delay for 2 seconds, it can jump normally. I asked AI and he said it might be because the initialization has not been completed yet. As a result, I cannot jump, so is there any way to monitor the time when the entire page is initialized?
function toLogin() {
setTimeout(function () {
webOSDev.launch({
id: "com.domain.login",
params: {},
onSuccess: function (res) {
// do something
console.log("success");
},
onFailure: function (res) {
// error
console.log("failed");
},
});
}, 2000)
}