Android Intent-filter 未使用 android :scheme on some devices 注册

标签 android intentfilter url-scheme

我的 Android 应用程序应该与我们的网站进行一些流媒体交互。如果用户没有安装该应用程序,我们会提供一个网页,告知该应用程序和下载它的链接。

信息页面位于:http://my.site.no/android

所有链接都以这个信息页为前缀:http://my.site.no/android?url=http://something.to.stream

在应用程序中,我声明了以下 Intent 过滤器:

<intent-filter>
    <data android:scheme="http" android:host="my.site.no" android:pathPrefix="/android" />
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
</intent-filter>

这适用于大多数设备……但有些设备(尤其是三星 Galaxy SIII 的)拒绝注册此 Intent 过滤器。即使安装了该应用程序,用户始终会登陆信息页面。这不仅发生在标准浏览器上,还发生在同一设备上的其他浏览器(如 firefox 和 chrome)上。拒绝注册 Intent 的设备上没有 Activity 的“默认应用”设置。

知道哪里出了问题吗?或者如何尝试调试它以找到原因?

最佳答案

可能您需要为方案“https”注册另一个。我在某些应用程序中遇到了这个问题,这解决了它。

关于Android Intent-filter 未使用 android :scheme on some devices 注册,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13759698/

相关文章:

c++ - 在 Windows 8 上共享应用程序 URI 方案注册

android - removeFooterView 没有删除页脚 View

java - 无法在 SDCard Android 上保存图像

android - 如何通过点击外部链接打开特定 ID 的特定 Activity

android - 使用 Intent 共享后 fragment 未恢复其 Activity

url-scheme - Apple Music URL Scheme

ios - 是否可以创建一个包含 url 链接的彩信来启动本地应用程序

android - 减少gradle包装器的构建时间

android - NPE : Attempt to invoke virtual method 'java.lang.CharSequence android.support.v7.widget.Toolbar.getTitle()' on a null object reference

android - MainActivity 的默认 Intent 过滤器是什么意思?