Introducing Content Providers

Content Providers provide an interface for publishing and consuming data, based around a simple URI addressing model using the content:/ / schema. They let you decouple the application layer from the data layer, making your applications data-source agnostic by hiding the underlying data source.

Shared Content Providers can be queried for results, existing records updated or deleted, and new records added. Any application with the appropriate permissions can add, remove, or update data from any other application — including from the native Android databases.

Many native databases are available as Content Providers, accessible by third-party applications, including the phone's contact manager, media store, and other native databases as described later in this chapter.

By publishing your own data sources as Content Providers, you make it possible for you (and other developers) to incorporate and extend your data in new applications.

Mobile Apps Made Easy

Mobile Apps Made Easy

Quick start guide to skyrocket your offline and online business success with mobile apps. If you know anything about mobile devices, you’ve probably heard that famous phrase coined by one of the mobile device’s most prolific creators proclaiming that there’s an app for pretty much everything.

Get My Free Training Guide


Post a comment