Я хочу найти контент приложения в Google.Я добавляю ArrayList в FirebaseAppIndex, но не могу найти все элементы списка из Поиска Google, я могу искать только последний элемент массива.
ArrayList<String> titleList = new ArrayList<>();
titleList.add("ABC");
titleList.add("DEF");
titleList.add("GHI");
titleList.add("KLM");
ArrayList<Indexable> indexableNotes = new ArrayList<>();
for (int i = 0; i < titleList.size(); i++) {
Indexable noteToIndex = Indexables.noteDigitalDocumentBuilder()
.setName(titleList.get(i) + " Note")
.setText("Pierogi")
.setUrl("http://recipe-app.com/recipe/pierogi-poutine")
.build();
Log.d("onHandleIntent", "update");
indexableNotes.add(noteToIndex);
}
for (int i = 0; i < indexableNotes.size(); i++) {
Indexable[] notesArr = new Indexable[indexableNotes.size()];
notesArr = indexableNotes.toArray(notesArr);
Log.d("update", notesArr.toString());
FirebaseAppIndex.getInstance().update(notesArr);
}
}