I am using a ContentProvider to provide search suggestions for a Searchable Configuration in my app.
I successfully receive query calls and when I create a MatrixCursor, add several rows, and return the cursor, they are properly displayed in the search results.
However, if I make an asynchronous network request to fetch results, then populate the same MatrixCursor with additional rows, these items are not populated in the search results.
I have tried calling
synchronized (cursor) {
cursor.notifyAll();
}
after adding the additional rows, but this does not appear to produce the desired result.
What is the best practice for asynchronously providing search results by way of a network request?