views:

21

answers:

1

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.

+2  A: 

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.

CommonsWare
Thank you, works
Andrew