I'm working on an application that allows users to send and receive messages. The messages are stored in a database on a server. I would like to display the messages in a ListView
, similar to an email inbox. Here is my planned implementation:
CursorLoader
and an SQLite
cache of messages stored on the device (e.g. from the last week)SQLite
database, and update the Cursor
Here are my questions:
Cursor
so its data is synced with the SQLite
database?Cursor
so that I can have a CursorAdapter
handling the ListView
?Yes this sounds like a good strategy. The key point here is to wrap the two data sources (SQLite and Server Data) into single source and to fetch data from it.