【问题标题】:Removing indexed data using android app indexing(Do not show indexed data in google search results)使用 android 应用索引删除索引数据(不在谷歌搜索结果中显示索引数据)
【发布时间】:2017-04-03 11:09:03
【问题描述】:

我可以使用“AppIndex.AppIndexApi.start(mGoogleApiClient, indexAction);”在默认的谷歌搜索结果(自动完成)上显示索引内容

但在那之后我决定从谷歌搜索结果中删除一些索引内容(自动完成)。

例如: 在应用程序的第一个版本中索引以下内容。 1. 虚拟内容(android-app://com.myindexingapp/sample/虚拟内容) 2. 虚拟内容2(android-app://com.myindexingapp/sample/虚拟内容2)

我可以在我的设备上的谷歌搜索结果中看到虚拟内容和虚拟内容2。

在第二个版本中,我只想显示虚拟内容 表示我想取消索引 Dummy content2(android-app://com.myindexingapp/sample/Dummy content2)

谁能帮我实现这一目标?

我尝试使用“AppIndex.AppIndexApi.end(mGoogleApiClient, indexAction);” 具有相同的操作,但它不起作用。

这里我使用“GoogleApiClient”和“AppIndex.AppIndexApi”来索引数据(在第一个版本中没有使用最新的firebase索引)。

【问题讨论】:

    标签: android android-app-indexing firebase-app-indexing


    【解决方案1】:

    使用下面的代码解决了这个问题。

    com.google.firebase.appindexing.Action fbIndexAction = Actions.newView(title, BASE_APP_URI.toString());
                Log.v(LOG_TAG, "@@@@ data path here " + title + " uri here " + BASE_APP_URI);
                FirebaseUserActions.getInstance().end(fbIndexAction);
    
                FirebaseAppIndex.getInstance().remove(BASE_APP_URI.toString());
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-23
      • 2012-10-19
      • 2012-09-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多