uniapp开发app,A款app调起B款app并传递参数
if (plus.os.name == "Android") { //安卓
if (plus.runtime.isApplicationExist({ //查看安卓系统手机有没有下载这款app
pname: 'xxxxxxx, //B款app云打包的包名
})) { //安装了app
plus.runtime.launchApplication({ //打开app
pname: "xxxxx", //B款app云打包的包名
extra: {
a, //传给B款app的参数
b,
c
},
function(e) {
console.log("Open system default browser failed: " + e.message);
}
})
}
else { //未安装app
uni.showToast({
title: '请先安装xxxxApp',
icon: 'none'
})
}
}