iOS兩個App應用之間的跳轉javascript
兩個APP之間跳轉html
H5頁面如何喚醒appjava
看說明分爲直接喚醒和點擊喚醒。
<html xmlns=http://www.w3.org/1999/xhtml>
<head>
<meta http-equiv=Content-Type content="text/html;charset=utf-8">
<head>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
</head>
<body>
<style>
#zjmobliestart{font-size:40px;}
</style>
<!--
-->
<a href="zjmobile://platformapi/startapp" id="zjmobliestart" target="_blank">喚醒浙江移動手機營業廳!</a>
function applink(){
return function(){
var clickedAt = +new Date;
setTimeout(function(){
!window.document.webkitHidden && setTimeout(function(){
if (+new Date - clickedAt < 2000){
window.location = "https://itunes.apple.com/us/app/zhe-jiang-yi-dong-shou-ji/id898243566#weixin.qq.com";
}
}, 500);
}, 500)
};
}
document.getElementById("zjmobliestart").onclick = applink();
</script>
</body>
</html>
<!Doctype html>
<html xmlns=http://www.w3.org/1999/xhtml>
<head>
<meta http-equiv=Content-Type content="text/html;charset=utf-8">
<head>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<title>直接喚醒demo</title>
</head>
<body>
<style>
#zjmobliestart{font-size:40px;}
</style>
<!--
說明:經過h5可換醒app,如訪問一個URL就能直接打開應用,若是該應用APP沒有安裝,那麼直接跳轉到App Store的APP下載頁面
兼容性通常:在手機各大瀏覽器(360瀏覽器 uc瀏覽器 搜狗瀏覽器 QQ瀏覽器 百度瀏覽器 )能喚醒。微信 QQ客戶端 新浪微博客戶端 騰訊微博客戶端沒法喚醒。
-->
<p id="zjmobliestart">喚醒浙江移動手機營業廳!</p>
<script type="text/javascript">
function applink(){
window.location = "zjmobile://platformapi/startapp";
var clickedAt = +new Date;
setTimeout(function(){
!window.document.webkitHidden && setTimeout(function(){
if (+new Date - clickedAt < 2000){
window.location = "https://itunes.apple.com/us/app/zhe-jiang-yi-dong-shou-ji/id898243566#weixin.qq.com";
}
}, 500);
}, 500)
}
applink();
</script>
</body>
</html>
iOS開發之自定義協議url:http://www.jianshu.com/p/c7a2a7f62357
頁面喚醒APP:http://liushuibird.blog.163.com/blog/static/1241915612013810113326699/