android:

在<android>的<manifestAdditions>标签下添加

<application android:enabled="true">

  <activity android:excludeFromRecents="false">

    <intent-filter>

      <action android:name="android.intent.action.MAIN"/>

      <category android:name="android.intent.category.LAUNCHER"/>

    </intent-filter>

    <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="example" />

    </intent-filter>

  </activity>

</application>

ios:

在<iPhone>的<InfoAdditions>下添加

<key>CFBundleURLTypes</key> 

<array> 

   <dict>

         <key>CFBundleURLSchemes</key> 

        <array> 

            <string>example</string>

        </array> 

        <key>CFBundleURLName</key> 

        <string>com.example.app</string> 

    </dict> 

</array>

HTML:JS中window.location("example://");

posted on 2016-01-29 16:26  TonyNing  阅读(230)  评论(0编辑  收藏  举报