Content Providers Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data security. Content providers are the standard interface that connects data in one process with code runn…
In this document Overview Accessing a provider Content URIs Content Provider Basics A content provider manages access to a central repository of data. A provider is part of an Android application, which often provides its own UI for working with the…
The <provider> Element Like Activity and Service components, a subclass of ContentProvider must be defined in the manifest file for its application, using the <provider> element. The Android system gets the following information from the eleme…
Creating a Content Provider In this document Designing Data Storage Designing Content URIs Implementing the ContentProvider Class Required Methods Implementing the query() method Implementing the insert() method Implementing the delete() method Imple…
Alternative Forms of Provider Access Three alternative forms of provider access are important in application development: Batch access: You can create a batch of access calls with methods in the ContentProviderOperation class, and then apply them wit…
Content Provider Permissions A provider's application can specify permissions that other applications must have in order to access the provider's data. These permissions ensure that the user knows what data an application will try to access. Based on…
Retrieving Data from the Provider This section describes how to retrieve data from a provider, using the User Dictionary Provider as an example. For the sake of clarity, the code snippets in this section call ContentResolver.query() on the "UI thread…
Provider Data Types Content providers can offer many different data types. The User Dictionary Provider offers only text, but providers can also offer the following formats: integer long integer (long) floating point long floating point (double) Anot…
Calendar Provider: guide/topics/providers/calendar-provider.html Contacts Provider: guide/topics/providers/contacts-provider.html Storage Access Framework: guide/topics/providers/document-provider.html…
Inserting, Updating, and Deleting Data In the same way that you retrieve data from a provider, you also use the interaction between a provider client and the provider's ContentProvider to modify data. You call a method of ContentResolver with argumen…