There are many ways to implement it -
- If using a
ContentProvider
there is no need to extend theCursorLoader
. - If not using a
ContentProvider
and using aSQLiteDatabase
instead, we can extend theCursorLoader
with our Custom-Loader and override theloadInBackground()
method ofCursorLoader
and instead of querying theContentProvider
we can query theSQLiteDatabase
. - While using a
SQLiteDatabase
we can extendAsyncTaskLoader
, however, this is more
tedious method than one specified in 2.