As google in there “wisdom” has ditched requery on cursor I am looking for alternatives.
http://developer.android.com/reference/android/database/Cursor.html
It helpfully says “Just request a new cursor, so you can do this asynchronously and update your list view once the new cursor comes back.”
However does this mean I now need to keep a record of the search run on each cursor so I can run it again ??
Wondering what people are doing.
CursorLoaderworks great withListViewandCursorAdapter. The problem is that you’ll have to write your ownContentProvider. This is not that much of work and is very worth it.If you are using the Cursor without putting it in an
Adapteryou can probably useAsyncQueryHandlerinstead and manually observing changes viaCursor.registerContentObserver(). Note that this approach also requires aContentProvider.If you really don’t want to implement a
ContentProvideryou’ll have to implement your own async query method or stick torequery(), don’t do this though.