1. Content Providers
made easier with
2. What are they?
• Managers of Structured Data
• Abstract underlying data storage
• Allow external access to data by apps
3. Why use them?
• Manage Connection to data source (open, close
connection and so on)
• Easily access data
• Provide data to external apps if required
• Search Suggestions
• Sync Adapter
• Implicit Intent
• Loader callbacks
4. So what is the problem?
Boilerplate code between projects
Maintaining DB version
Its not thread safe
Json – SQL mapping
Logic distributed over different parts of the app
Lack of visibility of whats going on
Rigidity of the API in making queries
Any change to content on the UI must result in a
corresponding change to backend data i.e. deletes
involves a round trip to the DB
5. What can we do?
……….Enter your favourite library here
• Already implemented boilerplate code
• Versioning is relatively easy
• Additional uri options is supported such as “limit”
– content://com.example.sqliteprovider/users?name=“Akshay Dashrath”