I'm kinda new in android development and I am little confused about content providers
. Content providers
are used to share your data with other application legally, but is it correct to use it for retrieving your data from SQLite database
and display it in, for instance listView
? What is better solution for displaying data from db?
Thanks
Asked
Active
Viewed 30 times
1

Greich
- 108
- 1
- 5
-
2yes, it is correct to use it for list view, although it is not mandatory. – njzk2 Mar 27 '17 at 15:23
2 Answers
0
Yes it is legit using the ContentProvider to retrieve data from a SQLite database while its perfectly fine creating an Handler to handle the SQLiteOpenHelper and just using it.
Its all depends on your app's needs, Me individually for my own app if no need for sharing data wouldn't use a content provider.

J. N
- 193
- 1
- 5
-
1
-
I would create a class which gets me the data and brings it to the ui if its a big data list i would use a recyclerview – J. N Mar 27 '17 at 15:40
0
if you don't need to share the data base from your app it's not necessary to use a Content Provider