我的 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/