做一个需求,要在手机浏览器里面唤起APP,当没有安装APP的时候跳转到下载页面。
当设置:scheme为:myAPP的时候,HTML对应的为:<a href="myapp://jp.app/openwith?name=zhangsan&age=26">invoke app</a>,这是可以正常调用起来的。
<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="myapp" android:host="kggl.adj.st"/>
</intent-filter>
但是问题来了,当schme设置为:http的时候,HTML对应的为:<a href="http://uyilive.com/">invoke app</a>,就无论如何也调用不起来了,只会去打开网页,无论有没有安装APP都是调用不成功的。
<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="https" android:host="kggl.adj.st"/>
</intent-filter> 
希望有大佬告诉小弟