Firebase App索引Android搜索结果

时间:2017-03-02 07:24:05

标签: android firebase firebase-app-indexing

我已实施此链接中提到的所有步骤:Firebase App Indexing Start。您在上面提到的实施步骤的所有测试都运行良好。我的应用也可在Google App ScreenShot中搜索到。我已经交叉检查了按钮违规,内容不匹配,如谷歌文档中所述。我们有一个带有正确索引页面的实时网站,我的应用程序在Play商店中。我的网站可以找到谷歌搜索结果,如果你点击链接它都要求通过应用程序打开,如果在应用程序中打开它将重定向到该特定内容。然而,通常与索引URL一起出现的应用程序图标以及网络链接未显示在搜索结果中。我无法确定问题所在。有些人可以解释我出错的地方。

1 个答案:

答案 0 :(得分:0)

您实施的方式的索引是本地的。这意味着它们只能在手机上使用,无法通过互联网访问。 首先你需要有网站。然后当您在Google上显示您的网站的搜索结果并且用户点击您的网站链接时,Android系统会询问用户如何打开它。在目标应用内或在浏览器中。

<intent-filter android:label="@string/app_name" android:autoVerify="true">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <!-- Accepts URIs that begin with "http://recipe-app.com/recipe" -->
        <data android:scheme="http"
            android:host="recipe-app.com"
            android:pathPrefix="/recipe" />
        <!-- Accepts URIs that begin with "https://recipe-app.com/recipe" -->
        <data android:scheme="https"
            android:host="recipe-app.com"
            android:pathPrefix="/recipe" />
    </intent-filter>

这里的网站是www.recipe-app.com所以如果用户在谷歌搜索结果中看到这个网站的一些结果,那么他可以在你的应用程序内打开它。和应用程序应该在谷歌游戏商店发布。希望它有所帮助!

我也建议您阅读此Codelab http://search-codelabs.appspot.com/codelabs/android-deep-linking#1