api使用详见 https://www.html5plus.org/doc/zh_cn/runtime.html
APP跳APP
- 方法一
// Android适用
let url = 'app的包名'
plus.runtime.launchApplication({
pname: url
})
// ios适用
let url = 'app的URLscheme' // eg:weixin://
plus.runtime.launchApplication({
action: url
})
- 方法二
// Android可以,不确定ios有用否
let url = 'app的URLscheme' // eg:weixin://
plus.runtime.openURL(url, function(res) {
console.log(res);
})
H5跳APP
let url = 'app的URLscheme' // eg:weixin://
// window.location.href = url;
window.open(url);
其他
还研究了webview唤起app,结果发现并不行,但是android原生开发是可以的。