判断设备是否安装了app

来源:互联网 发布:麦当劳上海数据 编辑:程序博客网 时间:2024/05/21 10:53

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


0 0
原创粉丝点击