Scott Main 50e990c64f Massive clobber of all HTML files in developer docs for new site design
Change-Id: Idc55a0b368c1d2c1e7d4999601b739dd57f08eb3
2012-06-21 21:27:30 -07:00

111 lines
3.9 KiB
Plaintext

page.title=Content Providers
@jd:body
<div id="qv-wrapper">
<div id="qv">
<!-- In this document -->
<h2>Topics</h2>
<ol>
<li>
<a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
Content Provider Basics</a>
</li>
<li>
<a href="{@docRoot}guide/topics/providers/content-provider-creating.html">
Creating a Content Provider</a>
</li>
<li>
<a href="{@docRoot}guide/topics/providers/calendar-provider.html">Calendar Provider</a>
</li>
<li>
<a href="{@docRoot}guide/topics/providers/contacts-provider.html">Contacts Provider</a>
</li>
</ol>
<!-- Related Samples -->
<h2>Related Samples</h2>
<ol>
<li>
<a href="{@docRoot}resources/samples/ContactManager/index.html">
Contact Manager</a> application
</li>
<li>
<a
href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/List2.html">
&quot;Cursor (People)&quot;
</a>
</li>
<li>
<a
href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/List7.html">
&quot;Cursor (Phones)&quot;</a>
</li>
<li>
<a href="{@docRoot}resources/samples/SampleSyncAdapter/index.html">
Sample Sync Adapter</a>
</li>
</ol>
</div>
</div>
<p>
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 running in another process.
</p>
<p>
When you want to access data in a content provider, you use the
{@link android.content.ContentResolver} object in your
application's {@link android.content.Context} to communicate with the provider as a client.
The {@link android.content.ContentResolver} object communicates with the provider object, an
instance of a class that implements {@link android.content.ContentProvider}. The provider
object receives data requests from clients, performs the requested action, and
returns the results.
</p>
<p>
You don't need to develop your own provider if you don't intend to share your data with
other applications. However, you do need your own provider to provide custom search
suggestions in your own application. You also need your own provider if you want to copy and
paste complex data or files from your application to other applications.
</p>
<p>
Android itself includes content providers that manage data such as audio, video, images, and
personal contact information. You can see some of them listed in the reference
documentation for the
<code><a href="{@docRoot}reference/android/provider/package-summary.html">android.provider</a>
</code> package. With some restrictions, these providers are accessible to any Android
application.
</p><p>
The following topics describe content providers in more detail:
</p>
<dl>
<dt>
<strong><a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
Content Provider Basics</a></strong>
</dt>
<dd>
How to access data in a content provider when the data is organized in tables.
</dd>
<dt>
<strong><a href="{@docRoot}guide/topics/providers/content-provider-creating.html">
Creating a Content Provider</a></strong>
</dt>
<dd>
How to create your own content provider.
</dd>
<dt>
<strong><a href="{@docRoot}guide/topics/providers/calendar-provider.html">
Calendar Provider</a></strong>
</dt>
<dd>
How to access the Calendar Provider that is part of the Android platform.
</dd>
<dt>
<strong><a href="{@docRoot}guide/topics/providers/contacts-provider.html">
Contacts Provider</a></strong>
</dt>
<dd>
How to access the Contacts Provider that is part of the Android platform.
</dd>
</dl>