第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

android端網(wǎng)頁超鏈接調(diào)用native app為什么在QQ,UC瀏覽器內(nèi)部打開了應(yīng)用,Chrome沒有任何問題

android端網(wǎng)頁超鏈接調(diào)用native app為什么在QQ,UC瀏覽器內(nèi)部打開了應(yīng)用,Chrome沒有任何問題

不負(fù)相思意 2019-02-22 01:22:06
上頭給了一個需求,要通過一個網(wǎng)頁的超鏈接啟動本地app,但是在網(wǎng)上查了相關(guān)資料都是通過自定義URL Schemes協(xié)議來啟動app,代碼如下: //android端xml配置 <intent-filter> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> <data android:scheme="test" android:host="gw" android:pathPrefix="/open" android:port="8888"/> </intent-filter> //js代碼: var t; var config = { scheme_IOS: 'appB://', scheme_Adr: 'test://gw:8888/open', download_url: "http://mb.sseinfo.com/ComInfoServer/ssegwappdownload.jsp", timeout: 600 }; function startApp(){ var startTime = Date.now(); if(isWeiXin()){ alert("請?jiān)跒g覽器中打開!"); }else{ var iframe = document.createElement("iframe"); if(checkOS()){ iframe.src=config.scheme_Adr; }else{ iframe.src=config.scheme_IOS; } iframe.style.display = "none"; document.body.appendChild(iframe); t = setTimeout(function() { var endTime = Date.now(); if (!startTime || endTime - startTime < config.timeout + 20) { window.location = config.download_url; } else { } }, config.timeout); window.onblur = function() { clearTimeout(t); } } } 那么問題就是,除了Chrome可以,在qq,UC瀏覽器中都會在瀏覽器內(nèi)部啟動app,在手機(jī)后臺進(jìn)程中并沒有啟動新的app,整個app界面直接是嵌入在瀏覽器
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 342 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號