应用程序未显示在Google搜索中

时间:2019-06-14 14:20:14

标签: android firebase indexing firebase-app-indexing

我在我的应用程序中设置了Firebase应用程序索引,总计可以正常工作,但是在google搜索中,我的应用程序没有显示,仅在Apps中和在Google App上自动完成显示。 >

   <code>
   private void firebaseIndexing(int position) {
        Indexable categoryToIndex = new Indexable.Builder()
                .setName(data.get(position).getTitle())
                .setUrl(BASE_URL + data.get(position).getLink())
                .build();
        Task<Void> task = FirebaseAppIndex.getInstance().update(categoryToIndex);
        task.addOnSuccessListener(aVoid -> Log.d("Api success", "App Indexing API: Successfully added categories to index. " + categoryToIndex));
        task.addOnFailureListener(exception -> Log.d("Api failed", "App Indexing API: Failed to add categories to index. " + exception
                .getMessage()));
    }

    private Action getCategoriesAction(int position) {
        return Actions.newView(data.get(position).getTitle(), BASE_URL + data.get(position).getLink());
    }
</code>

0 个答案:

没有答案