android :
在 AppActivity中增加
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="XXX" android:pathPrefix="xxxx/xxxx/xxx" />
</intent-filter>
ios:
在info.plist 中增加 URL Types
identifler : xxxx ; URL Schemes: XXX
调用方式:
android: window.location="XXX:/xxxx/xxxx/xxx?data=XXXXXXX";
ios: window.location="XXX://xxxx";
参考:https://segmentfault.com/q/1010000000642350
http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
http://stackoverflow.com/questions/13644712/launch-application-from-browser-url-scheme