Reputation: 423
I'm trying to find out what is the difference between setting up the database through DbAdapter class or setting up everything in Content Provider ?
Is it true that the DbAdapter class is more of a temporary stopgap while the ContentProvider is a long term solution that allows more functionalities such as search capability and stuff ?
Can an instance of the Dbadapter class be built within the ContentProvider ? such that I actually can just call and manage everything from the DB straight from the Provider class ?
Upvotes: 1
Views: 1005
Reputation: 8072
I would definitely recommend investing some time learning how to write a ContentProvider. They are a little daunting at first but once you've mastered the concept you'll get payback bigtime; especially if you're creating a moderately complex app.
When using a ContentProvider:
Indeed the ContentProvider is a wrapper around your DBAdapter providing standard method such as query, update, delete etc.
Here is a good tutorial: http://thinkandroid.wordpress.com/2010/01/13/writing-your-own-contentprovider/
Upvotes: 1