android - SQLite database and CursorLoaders -
I am working on a client-side Android application that will retrieve data from a URL and save it to a local database. Could. I'm familiar with using the
SQLiteDatabase
for this operation. My concern started when I was reading about SimpleCursorAdapter
to display the table row in the list when I was about Cursor Loader
If I read, to manage the cursor asynchronously
This is the thing that when they read about it, they talk about ContentProvider
and As far as I know, that class is used to share data between apps Is done, so I got super confused.
Can you guide me through this, I do not know that I need to use a cursor loader
because I do not know what it is, and it Sharing data between what to do and what to do with the ContentProvider
.
EDIT: Reading the demo app found here
It seems that you want to retrieve the data line 122: On CrateLoader
Public Loader & lt; Cursor & gt; OnCreateLoader (int loaderId, bundle args) {loader = new SQLiteCursorLoader (this, db, "SELECT _ID, title, value" + "with title ORDER", blank); Return (loader); }
Does this mean that I can not use the SQLiteDatabase # query () method now? Such as db.query (table, column, selection, selection, group, group, having, order);