婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 知識(shí)庫(kù) > HTML5打開本地app應(yīng)用的方法

HTML5打開本地app應(yīng)用的方法

熱門標(biāo)簽:漳州人工外呼系統(tǒng)排名 ai電銷機(jī)器人連接網(wǎng)關(guān) 鄭州電銷外呼系統(tǒng)違法嗎 威海營(yíng)銷外呼系統(tǒng)招商 跟電銷機(jī)器人做同事 中紳電銷智能機(jī)器人 濟(jì)南辦理400電話 農(nóng)村住宅地圖標(biāo)注 鶴壁手機(jī)自動(dòng)外呼系統(tǒng)怎么安裝

本文為大家分享了HTML5打開本地app應(yīng)用的方法,具體內(nèi)容如下

首先為了保證能夠打開你的app,你必須要在androidManifest.xml中配置的filter中data的屬性表述。<data android:pathprefix="/taoge/open" android:scheme="xttblog"></data> androidManifest.xml代碼如下:

XML/HTML Code復(fù)制內(nèi)容到剪貼板
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"  
  3.     package="com.taoge"  
  4.     android:versionCode="2"  
  5.     android:versionName="3.24.03" >  
  6.     <uses-sdk  
  7.         android:minSdkVersion="8"  
  8.         android:targetSdkVersion="17" />  
  9.     <application  
  10.         android:allowBackup="true"  
  11.         android:configChanges="orientation|screenSize"  
  12.         android:icon="@drawable/logo"  
  13.         android:label="@string/app_name"  
  14.         android:logo="@drawable/logo"  
  15.         android:sharedUserId="android.uid.system"  
  16.         android:theme="@android:style/Theme.Light.NoTitleBar" >  
  17.         <activity  
  18.             android:name="xttblog.WelcomeActivity"  
  19.             android:excludeFromRecents="true"  
  20.             android:screenOrientation="portrait"  
  21.             android:theme="@android:style/Theme.Light.NoTitleBar" >  
  22.             <intent-filter>  
  23.                 <action android:name="android.intent.action.MAIN" />  
  24.                 <category android:name="android.intent.category.LAUNCHER" />  
  25.             </intent-filter>  
  26.             <intent-filter>  
  27.                 <action android:name="android.intent.action.VIEW" />  
  28.                 <category android:name="android.intent.category.BROWSABLE" />  
  29.                 <category android:name="android.intent.category.DEFAULT" />  
  30.                 <data android:pathPrefix="/taoge/open"  
  31.                     android:scheme="xttblog" />  
  32.             </intent-filter>  
  33.         </activity>  
  34.         <activity  
  35.             android:name="xttblog.AntRepairActivity"  
  36.             android:label="@string/title_activity_ant_repair" >  
  37.         </activity>  
  38.     </application>  
  39. </manifest>  

其次,你要在你的網(wǎng)頁(yè)中訪問(wèn)xttblog://taoge/open。可以使用的元素有很多,如:script,iframe,img等。使用它們的src屬性,訪問(wèn)xttblog://taoge/open。html5代碼如下:

XML/HTML Code復(fù)制內(nèi)容到剪貼板
  1. <!DOCTYPE HTML>  
  2. <html>  
  3. <script>  
  4.  function openapp(){   
  5.   document.getElementById('xttblog').innerHTML='<iframe src="xttblog://taoge/open"></iframe>';   
  6.  }   
  7. </script>  
  8. <body>  
  9.  <div style="display:none;" id="xttblog"></div>  
  10.  <input type="button" value="打開app" onclick="openapp();">  
  11. </body>  
  12. </html>  

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助。

標(biāo)簽:營(yíng)口 咸陽(yáng) 紅河 蘇州 甘南 文山 惠州 萍鄉(xiāng)

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《HTML5打開本地app應(yīng)用的方法》,本文關(guān)鍵詞  HTML5,打開,本地,app,應(yīng),用的,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《HTML5打開本地app應(yīng)用的方法》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于HTML5打開本地app應(yīng)用的方法的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 东阿县| 开封县| 封开县| 永仁县| 军事| 潮州市| 龙海市| 长葛市| 鄯善县| 兴安盟| 治多县| 赤水市| 迭部县| 凭祥市| 迭部县| 金寨县| 布拖县| 巍山| 东莞市| 濮阳市| 报价| 洛南县| 洛南县| 赤水市| 罗田县| 安国市| 夹江县| 吉林市| 多伦县| 襄垣县| 南开区| 来凤县| 温宿县| 麻阳| 黔西县| 内乡县| 台中市| 垫江县| 双牌县| 临澧县| 花垣县|