Updating CursorAdapters

When my Activity resumes, I query for a Cursor (by calling managedQuery to retrieve a Cursor pointing at my database using a ContentProvider), call startManagingCursor, instantiate a new CursorAdapter, and setListAdapter to my new CursorAdapter.

Suppose, at some later point, I launch some thread that hits a web service to query for new data to add to that table. Do I need to repeat everything I've listed above again?

This is what I'm currently doing, but I'm wondering if there isn't a more efficient way of doing it.

Answers


Suppose, at some later point, I launch some thread that hits a web service to query for new data to add to that table. Do I need to repeat everything I've listed above again?

No, just call requery() on the Cursor.


Need Your Help

My array of sprites is not getting drawn on my renderwindow

c++ arrays sfml

So I am trying to make a chessgame, and of course I am starting out with just making the board. For this I am creating a two-dimensional array like 8x8. Each tile has their own object sprite called

for each item in array if match do this else if using jvectormaps

javascript jquery arrays variables jvectormap

I am trying to setup an array of states and if a state or value exists in the array do a function. Below is the actual code i am trying to modify and the "stateRedirects" var is what i am trying to...