好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > HTML5打開本地app應用的方法

HTML5打開本地app應用的方法

熱門標簽:漳州人工外呼系統排名 ai電銷機器人連接網關 鄭州電銷外呼系統違法嗎 威海營銷外呼系統招商 跟電銷機器人做同事 中紳電銷智能機器人 濟南辦理400電話 農村住宅地圖標注 鶴壁手機自動外呼系統怎么安裝

本文為大家分享了HTML5打開本地app應用的方法,具體內容如下

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

XML/HTML Code復制內容到剪貼板
  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>  

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

XML/HTML Code復制內容到剪貼板
  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>  

以上就是本文的全部內容,希望對大家的學習有所幫助。

標簽:營口 咸陽 紅河 蘇州 甘南 文山 惠州 萍鄉

巨人網絡通訊聲明:本文標題《HTML5打開本地app應用的方法》,本文關鍵詞  HTML5,打開,本地,app,應,用的,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《HTML5打開本地app應用的方法》相關的同類信息!
  • 本頁收集關于HTML5打開本地app應用的方法的相關信息資訊供網民參考!
  • 推薦文章