Content Providers with SqlLite and CursorLoader


#1

Why not to use Content Providers for SqlLite, is there any good reason not to?
They say that working with CursorLoader is easier than with AsyncTaskLoader. Is it worth trying?
Then database is public for ather applications, but…
Few links with examples:
developer.android.com/guide/topi … ating.html
vogella.com/articles/Android … activities
techotopia.com/index.php/An_ … r_Tutorial
techotopia.com/index.php/Und … _Providers


#2

The big downside is that you need to write additional boilerplate code for every single query you write. And unless you’re interfacing with other apps, there is no substantial upside.


#3

Thanks. I decided that i will use the same approach that is in your book. It is good. But I will have four tables. Should I create helpers for each table. Because I will use quite a lot different queries and it will be a mess have it in one file.


#4

Sounds like you want to use more than one file.

Go crazy, man. If more classes make it easier to understand and read, then use more classes.