I have implemented Android Firebase App Indexing Personal Content in my app. I am indexing articles for easy search from Google Search Assistant. It works fine with Phones[tested on Samsung S7 Edge & S8] but does not show up the results in any tablets [Nexus 7(5.0.1), Samsung Tab S2(7.0)].
Also the entries are listed in Settings -> Google Settings -> FireBase App Indexing, under the application. in correct way in both Phones & Tablets.
url: "android-app//custom-package/....."
type: "DigitalDocument"
nane: ["FC Barcelona..."]
metadata:{
worksoffline:false
score:0
}
Screenshots:-
Search Works with Phones:
Search Result not working in Tablet:
Below is the code where I am storing articles as personal content in System.
ArrayList<Indexable> indexableArticles = new ArrayList<>();
for (IndexEntry e : indexFeed) {
Indexable articleToIndex = Indexables.digitalDocumentBuilder()
.setName(e.getTitle())
.setUrl(e.getUrl())
.build();
indexableArticles.add(articleToIndex);
}
if (indexableArticles.size() > 0) {
Indexable[] indexedArr = new Indexable[indexableArticles.size()];
indexedArr = indexableArticles.toArray(indexedArr);
// batch insert indexable articles into index
FirebaseAppIndex.getInstance().update(indexedArr);
}
Also I am using 'com.google.firebase:firebase-appindexing:10.2.6' library
Can't figure out what is the issue in Tablet even after it indexes the articles. Happy to recieve you'll help. Thanks.