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.

//content provider是连接两个进程间数据的标准接口

When you want to access data in a content provider, you use the ContentResolver object in your application's Context to communicate with the provider as a client. The ContentResolver object communicates with the provider object, an instance of a class that implements ContentProvider. The provider object receives data requests from clients, performs the requested action, and returns the results.

//当你想访问content provider中的数据时,你要使用content resolver对象作为一个client来和contentprovider这个server来通信。content resolver和一个provider对象通信,这个对象是一个实现了contentprovider的实例。这个provider接收到了client的请求,执行请求操作,然后返回结果。

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.

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 theandroid.provider package. With some restrictions, these providers are accessible to any Android application.

The following topics describe content providers in more detail:

Content Provider Basics
How to access data in a content provider when the data is organized in tables.
Creating a Content Provider
How to create your own content provider.
Calendar Provider
How to access the Calendar Provider that is part of the Android platform.
Contacts Provider
How to access the Contacts Provider that is part of the Android platform.

Content Providers的更多相关文章

  1. Content Providers详解

    今天仔细阅读了一遍Content Providers的官方API文档,总结了一下Android中Content Providers的用法. 各种类型的Content Provider对一个结构化的数据 ...

  2. Content Providers的步骤,来自官网文档

    Content Providers In this document Content provider basics Querying a content provider Modifying dat ...

  3. Android 4 学习(16):Database and Content Providers

    参考<Professional Android 4 Development> Database and Content Providers Android Database简介 Andro ...

  4. Android Content Provider Guides

    Android Content Provider Guides Content Providers管理对结构化数据集的访问.它们包装数据,并且提供一种定义数据安全的机制. Content provid ...

  5. Android Content Provider基础

    Android Content Provider基础 Content Providers Content providers管理对一个结构化的数据集合的访问.它们封装了数据,并且提供了保护数据安全性的 ...

  6. ContentProvider官方教程(2)简介、Content URIs

    In this document Overview Accessing a provider Content URIs Content Provider Basics A content provid ...

  7. ContentProvider官方教程(1)何时用content provider

    Content Providers Content providers manage access to a structured set of data. They encapsulate the ...

  8. Android Contacts (android通讯录读取)-content provider

    Content Provider 在数据处理中,Android通常使用Content Provider的方式.Content Provider使用Uri实例作为句柄的数据封装的,很方便地访问地进行数据 ...

  9. Android开发-API指南-Content Provider

    Content Providers 英文原文:http://developer.android.com/guide/topics/providers/content-providers.html 采集 ...

随机推荐

  1. Java 引用 WeakReference

    Reference 是一个抽象类,而 SoftReference,WeakReference,PhantomReference 以及 FinalReference 都是继承它的具体类.接下来我们来分别 ...

  2. cout输出字符串指针

    先给出通过字符型指针输出字符串的示例代码,如下: #include <iostream>using std::cout;using std::endl; int main(){ const ...

  3. Android+clipse导入工程提示:invalid project description

    今天遇到一个奇怪的问题.一个android的工程用eclipse导入的时候,提示错误.错误为:invalid project description . details为xxxx project ov ...

  4. C - Point on Spira

      Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Pr ...

  5. Scala:(2)控制结构

    (1)if else val s=) else -1 (2)循环 ){ r=r*n n-= } ///for 循环 to n) r=r*i //until val s="Hello" ...

  6. lambda -- Java 8 find first element by predicate

        Java 8 find first element by predicate up vote6down votefavorite I've just started playing with ...

  7. 【转】在ubuntu环境下搭建svn server遇到的一些问题

    原文网址:http://www.cnblogs.com/pcchinadreamfly/archive/2012/11/24/2786046.html 前段时间在ubuntu 12.04lts上倒腾了 ...

  8. 15个值得开发人员关注的jQuery开发技巧和心得

    在这篇文章中,我们将介绍15个让你的jQuery更加有效的技巧,大部分关于性能提升的,希望大家能够喜欢! 1. 尽量使用最新版本的jQuery类库 jQuery项目中使用了大量的创新.最好的方法来提高 ...

  9. 哈希表(Hashtable)简述

    一,哈希表(Hashtable)简述 在.NET Framework中,Hashtable是System.Collections命名空间提供的一个容器,用于处理和表现类似keyvalue的键值对,其中 ...

  10. codeforce --- 340D

    D. Bubble Sort Graph time limit per test 1 second memory limit per test 256 megabytes input standard ...