uniapp判断第三方应用是否存在并打开应用
//pname是包名
if(plus.runtime.isApplicationExist({pname:'com.tencent.mm',action:'weixin://'})){
console.log("应用已安装");
if ( plus.os.name == "Android" ) {
plus.runtime.launchApplication( {pname:"com.tencent.mm"
,extra:{url:""}}, function ( e ) {
//alert( "Open system default browser failed: " + e.message );
} );
} else if ( plus.os.name == "iOS" ) {
/*plus.runtime.launchApplication( {action:"http://www.html5plus.org"}, function ( e ) {
alert( "Open system default browser failed: " + e.message );
} );*/
}
}else{
console.log("应用未安装");
}