簡體   English   中英

Android - Firebase App Indexing App未顯示在Google自動填充建議中

[英]Android - Firebase App Indexing App not showing in google autocomplete suggestions

我想實現火力地堡應用編入索引,而更新的可轉位的任務,顯示成功,並在谷歌應用程序搜索后的指數也顯示在了在應用程序選項卡。 根據我的理解,在Google App中搜索時,索引也應顯示在自動完成建議中但未顯示。 我從這里開始關注教程。 以下是我用來索引內容的代碼片段:

Indexable menuItemToIndex = Indexables.noteDigitalDocumentBuilder()
                            .setName(title)
                            .setText(text)
                            .setUrl(link)
                            .build();

Task<Void> task = FirebaseAppIndex.getInstance().update(menuItemToIndex);

task.addOnCompleteListener(new OnCompleteListener<Void>() {
    @Override
    public void onComplete(@NonNull Task<Void> task) {
        Log.d(TAG, "App index updated: " + title);
    }
});

我正在使用的Firebase App Indexing庫的版本也是

compile 'com.google.firebase:firebase-appindexing:10.0.1'

有什么我想念的嗎? 我正在測試運行在Stock 7.1.1和Google App版本6.9.36.21.arm64上的Nexus 6P。

Indexables需要使用Indexable.Builder構建,每個項目(提示循環)......而DigitalDocumentBuilder是一個相當具體的實現,特別是對於數字文檔。

Indexable recipe = new Indexable.Builder()
    .setName("Brownie Recipe")
    .setUrl("//acme.com/recipes/12345678")
    .build();

FirebaseAppIndex.getInstance().update(recipe);

教程(和問題)似乎有點過時了; 當前版本是11.0.2

另外還有com.google.android.gmsplay-services-appindexing

在更新了您已完成的項目之后,您還需要使用與更新項目相同的URL創建相應的視圖操作,就像在配方應用程序中一樣,然后它將自動完成。

FirebaseUserActions.getInstance().start(Actions.newView(item.getTitle(),"http://example.com/item?id=5"))

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM