HTML支持安装Android应用程序,只有当重定向到自定义协议 [英] HTML redirect to custom protocol only when supporting Android app is installed

查看:178
本文介绍了HTML支持安装Android应用程序,只有当重定向到自定义协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想有针对我的应用程序启动我的应用程序,如果它被安装了所有的URI。如果没有安装,我想显示一个网页,我的应用程序。细算以下两个问题,我仍然无法找到一个可靠的解决方案。

I would like to have all URIs intended for my app launch my app if it is installed. And if it is not installed I would like to display a web page about my app. After looking at the following two questions, I still can't find a reliable solution.

<一个href="http://stackoverflow.com/questions/16191219/intent-filter-works-from-google-but-not-chrome-facebook">Intent过滤器可以通过Google+,而不是Chrome浏览器和Facebook的

<一个href="http://stackoverflow.com/questions/13518453/android-redirect-to-store-if-app-not-installed-launch-from-website">Android - 重定向到存放如果不安装的应用程序(从网站上发布)

与第一溶液(重定向)的问题是,重定向到自定义协议会导致错误页时没有安装的应用程序,如在第二个问题中所述。与第二个解决方案(与意图过滤器通过服务器名使用http协议)的问题是,Chrome不兑现的意图过滤器,如在第一个问题中所述。所以,现在的问题是,有没有什么办法prevent从没有安装支持的应用程序时出现的重定向?

The problem with the first solution (redirect) is that redirecting to a custom protocol leads to an error page when the app is not installed, as described in the second question. The problem with the second solution (use http protocol with intent filter by server name) is that Chrome doesn't honor the intent filter, as described in the first question. So now the question is, is there any way to prevent the redirect from occurring when no supported app is installed?

推荐答案

这家伙似乎有一个解决问题的方法:<一href="http://stackoverflow.com/questions/12036793/android-browser-facebook-redirect-does-not-always-trigger-intent-for-url">Android浏览Facebook的重定向不总是触发意图网址。 或者至少它工作得很好。最好的事情我已经发现迄今。

This guy seems to have a solution to your problem:Android Browser Facebook Redirect Does Not Always Trigger Intent for URL. Or at least it is working quite well. Best thing I have found so far.

这篇关于HTML支持安装Android应用程序,只有当重定向到自定义协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆