从 Chrome 应用程序搜索时,Android 应用程序索引不起作用

标签 android search indexing android-manifest intentfilter

我已经为我的 Android 应用程序集成了应用程序索引,这样每当用户从移动谷歌搜索时,网站列表就会被列出,点击我的网站时它将转到我的 Android 应用程序而不是网页。当我从谷歌搜索应用程序搜索时,这工作正常,而当我搜索我的 chrome 浏览器应用程序时,它不起作用。

已使用本指南实现 http://googlewebmastercentral.blogspot.in/2014/06/android-app-indexing-is-now-open-for.html

这是我在 list 中使用的 Intent 过滤器

<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="http"
                       android:host="mysitedomain"/>
</intent-filter> 

我也试过 <category android:name="android.intent.category.APP_BROWSER" /> 我已经从开发人员控制台完成了站点验证。

我是否缺少任何配置设置 任何建议都会有所帮助。

谢谢。

最佳答案

每当我们需要通过点击来自 chrome 浏览器的链接来调用应用程序时,该应用程序绝对应该在 intent 过滤器的数据标签中包含 pathPrefix

在我的例子中,对于从 chrome 浏览器进行的应用程序索引搜索,我需要包括它。

<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="http"
                       android:host="mysitedomain"
                       android:pathPrefix="/" />
</intent-filter>

关于从 Chrome 应用程序搜索时,Android 应用程序索引不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24752197/

相关文章:

android - 动画切换按钮

mysql - 我应该在值数量有限的列上使用索引吗?

android - 我如何测试没有为非模拟对象调用方法?

android - 实现 Android 搜索过滤器,如 FourSquare 或 Ebay

python - 获取部分html代码作为python中的新字符串

search - vim 中的字符串完全匹配? (就像在less中的 'regex-off'模式。)

mysql - 为什么索引使用取决于列类型

android - 按需显示/隐藏 Listview SectionIndex

android - 我怎样才能实时获得强信号?

java - 安卓.view.InflateException : Binary XML file line #33: Error inflating class fragment