2***@qq.com
2***@qq.com
  • 发布:2020-09-05 13:56
  • 更新:2021-08-16 15:46
  • 阅读:1001

笔记渲染x5杀掉进程,app退出不行要kill掉

分类:5+ SDK

小白的笔记
var Intent = plus.android.importClass("android.os.Process");
var pid = Intent.myPid()
console.log("进程id:"+pid)
Intent.killProcess(pid)

逻辑 提示杀掉,让用户重新打开
function 内核判断(){
if(寻找文本(plus.navigator.getUserAgent(),"MQQBrowser")!= -1 ){
console.log ("x5");
}else{
询问框_原生("需要重新打开app","内核加载(可能多次加载)","立即","稍后");
}
}
function 杀掉进程(){
var Intent = plus.android.importClass("android.os.Process");
var pid = Intent.myPid();
console.log("进程id:"+pid);
Intent.killProcess(pid);
}

0 关注 分享

要回复文章请先登录注册

y***@163.com

y***@163.com

管用,好使,厉害
2021-08-16 15:46