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…
MIME Type Reference Content providers can return standard MIME media types, or custom MIME type strings, or both. provider支持标准MIME和自定义的MIME MIME types have the format 标准MIME格式如下: type/subtype For example, the well-known MIME type text/html has the te…
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 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…
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…
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…
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…