APP 間跳轉 & H5 跳到APP


iOS兩個App應用之間的跳轉

兩個APP之間跳轉

H5頁面如何喚醒app

看說明分為直接喚醒和點擊喚醒。
<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下載頁面,通過點擊的方式兼容性較好,如果安裝了app,在手機各大瀏覽器(360瀏覽器 uc瀏覽器 搜狗瀏覽器 QQ瀏覽器 百度瀏覽器 )和QQ客戶端中,能喚醒。微信 新浪微博客戶端 騰訊微博客戶端無法喚醒。
-->
 
<a href="zjmobile://platformapi/startapp" id="zjmobliestart" target="_blank">喚醒浙江移動手機營業廳!</a>
 
<script type="text/javascript"> 
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/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM