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 running in another process.

  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.

  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.

  通常需要在不同应用间共享一些数据(图片,音频,联系人等)时.才用Content Provider

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

  android系统内的图片,音频,联系人就是用Content Provider提供的。

ContentProvider官方教程(1)何时用content provider的更多相关文章

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

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

  2. ContentProvider官方教程(10)<provider>元素及属性介绍

    The <provider> Element Like Activity and Service components, a subclass of ContentProvider mus ...

  3. ContentProvider官方教程(9)定义一个provider完整示例:实现方法,定义权限等

    Creating a Content Provider In this document Designing Data Storage Designing Content URIs Implement ...

  4. ContentProvider官方教程(7)3种访问形式:批处理、异步访问、intent间接访问(临时URI权限)

    Alternative Forms of Provider Access Three alternative forms of provider access are important in app ...

  5. ContentProvider官方教程(4)ContentResolver权限

    Content Provider Permissions A provider's application can specify permissions that other application ...

  6. ContentProvider官方教程(3)ContentResolver查询、遍历 示例

    Retrieving Data from the Provider This section describes how to retrieve data from a provider, using ...

  7. ContentProvider官方教程(6)provider支持的数据类型

    Provider Data Types Content providers can offer many different data types. The User Dictionary Provi ...

  8. ContentProvider官方教程(11)Calendar Provider、Contacts Provider、Storage Access Framework

    Calendar Provider: guide/topics/providers/calendar-provider.html Contacts Provider: guide/topics/pro ...

  9. ContentProvider官方教程(5)ContentResolver插入、更新、删除 示例

    Inserting, Updating, and Deleting Data In the same way that you retrieve data from a provider, you a ...

随机推荐

  1. java 8种基本数据类型

    数值型--> 整  型:int,short,long,byte 浮点型:double,float 字符型-->char 布尔型-->boolean

  2. URAL 1139 City Blocks(数论)

    The blocks in the city of Fishburg are of square form. N avenues running south to north and Mstreets ...

  3. mldn android

    ed2k://|file|%E9%AD%94%E4%B9%90%E7%A7%91%E6%8A%80_Android%E5%BC%80%E5%8F%91%E5%AE%9E%E6%88%98%E7%BB% ...

  4. JAVA测试装饰者模式

    package shb.java.demo; /** * 测试装饰者模式 * @package :shb.java.demoJava02 * @author shaobn * @Describe : ...

  5. paper 61:计算机视觉领域的一些牛人博客,超有实力的研究机构等的网站链接

    转载出处:blog.csdn.net/carson2005 以下链接是本人整理的关于计算机视觉(ComputerVision, CV)相关领域的网站链接,其中有CV牛人的主页,CV研究小组的主页,CV ...

  6. jquery stop

    stop():停止当前活动的动画,但允许已排队的动画向前执行 stop(true):停止当前活动的动画,并清空动画队列:因此元素上的所有动画都会停止 stop(true,true):会立即完成当前活动 ...

  7. C# 多线程 lock 实例

    class Program { static void Main(string[] args) { //在t1线程中调用LockMe,并将deadlock设为true(将出现死锁) int i = 1 ...

  8. mac ruby rails安装(使用rvm)

    mac的场合: which ruby -> /usr/bin/ruby -> 这是mac自带的ruby,我们希望能用管理ruby的版本. 安装rvm curl -L https://get ...

  9. PAT乙级 1018. 锤子剪刀布 (20)

    1018. 锤子剪刀布 (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 大家应该都会玩“锤子剪刀布”的游 ...

  10. jquery tab键转换

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...