1page.title=Content Providers
2@jd:body
3<div id="qv-wrapper">
4<div id="qv">
5
6
7<!-- In this document -->
8<h2>Topics</h2>
9<ol>
10    <li>
11        <a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
12        Content Provider Basics</a>
13    </li>
14    <li>
15        <a href="{@docRoot}guide/topics/providers/content-provider-creating.html">
16        Creating a Content Provider</a>
17    </li>
18    <li>
19        <a href="{@docRoot}guide/topics/providers/calendar-provider.html">Calendar Provider</a>
20    </li>
21    <li>
22        <a href="{@docRoot}guide/topics/providers/contacts-provider.html">Contacts Provider</a>
23    </li>
24</ol>
25
26    <!-- Related Samples -->
27<h2>Related Samples</h2>
28    <ol>
29        <li>
30            <a href="{@docRoot}resources/samples/ContactManager/index.html">
31            Contact Manager</a> application
32        </li>
33        <li>
34        <a
35        href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/List2.html">
36        &quot;Cursor (People)&quot;
37        </a>
38        </li>
39        <li>
40        <a
41        href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/List7.html">
42        &quot;Cursor (Phones)&quot;</a>
43        </li>
44        <li>
45            <a href="{@docRoot}resources/samples/SampleSyncAdapter/index.html">
46            Sample Sync Adapter</a>
47        </li>
48    </ol>
49</div>
50</div>
51<p>
52    Content providers manage access to a structured set of data. They encapsulate the
53    data, and provide mechanisms for defining data security. Content providers are the standard
54    interface that connects data in one process with code running in another process.
55</p>
56<p>
57    When you want to access data in a content provider, you use the
58    {@link android.content.ContentResolver} object in your
59    application's {@link android.content.Context} to communicate with the provider as a client.
60    The {@link android.content.ContentResolver} object communicates with the provider object, an
61    instance of a class that implements {@link android.content.ContentProvider}. The provider
62    object receives data requests from clients, performs the requested action, and
63    returns the results.
64</p>
65<p>
66    You don't need to develop your own provider if you don't intend to share your data with
67    other applications. However, you do need your own provider to provide custom search
68    suggestions in your own application. You also need your own provider if you want to copy and
69    paste complex data or files from your application to other applications.
70</p>
71<p>
72    Android itself includes content providers that manage data such as audio, video, images, and
73    personal contact information. You can see some of them listed in the reference
74    documentation for the
75    <code><a href="{@docRoot}reference/android/provider/package-summary.html">android.provider</a>
76    </code> package. With some restrictions, these providers are accessible to any Android
77    application.
78</p><p>
79    The following topics describe content providers in more detail:
80</p>
81<dl>
82    <dt>
83        <strong><a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
84        Content Provider Basics</a></strong>
85    </dt>
86    <dd>
87        How to access data in a content provider when the data is organized in tables.
88    </dd>
89    <dt>
90        <strong><a href="{@docRoot}guide/topics/providers/content-provider-creating.html">
91        Creating a Content Provider</a></strong>
92    </dt>
93    <dd>
94        How to create your own content provider.
95    </dd>
96    <dt>
97        <strong><a href="{@docRoot}guide/topics/providers/calendar-provider.html">
98        Calendar Provider</a></strong>
99    </dt>
100    <dd>
101        How to access the Calendar Provider that is part of the Android platform.
102    </dd>
103    <dt>
104        <strong><a href="{@docRoot}guide/topics/providers/contacts-provider.html">
105        Contacts Provider</a></strong>
106    </dt>
107    <dd>
108        How to access the Contacts Provider that is part of the Android platform.
109    </dd>
110</dl>
111