ContentProvider官方教程(1)何时用content provider
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的更多相关文章
- ContentProvider官方教程(2)简介、Content URIs
In this document Overview Accessing a provider Content URIs Content Provider Basics A content provid ...
- ContentProvider官方教程(10)<provider>元素及属性介绍
The <provider> Element Like Activity and Service components, a subclass of ContentProvider mus ...
- ContentProvider官方教程(9)定义一个provider完整示例:实现方法,定义权限等
Creating a Content Provider In this document Designing Data Storage Designing Content URIs Implement ...
- ContentProvider官方教程(7)3种访问形式:批处理、异步访问、intent间接访问(临时URI权限)
Alternative Forms of Provider Access Three alternative forms of provider access are important in app ...
- ContentProvider官方教程(4)ContentResolver权限
Content Provider Permissions A provider's application can specify permissions that other application ...
- ContentProvider官方教程(3)ContentResolver查询、遍历 示例
Retrieving Data from the Provider This section describes how to retrieve data from a provider, using ...
- ContentProvider官方教程(6)provider支持的数据类型
Provider Data Types Content providers can offer many different data types. The User Dictionary Provi ...
- ContentProvider官方教程(11)Calendar Provider、Contacts Provider、Storage Access Framework
Calendar Provider: guide/topics/providers/calendar-provider.html Contacts Provider: guide/topics/pro ...
- ContentProvider官方教程(5)ContentResolver插入、更新、删除 示例
Inserting, Updating, and Deleting Data In the same way that you retrieve data from a provider, you a ...
随机推荐
- JSP数据交互习题错误总结
1:如果注册完页面有中文字符需要在提交后的页面显示注册信息,切记先把接受到的request的编码方式改为中文:request.setCharacterEncoding("utf-8" ...
- JSP动作跳转页面的时候与根目录的问题
在JSP动作:<jsp:forward page="....">中,这个page属性所指定的页面要包含根目录的话,必须要用"/",不能够用" ...
- struts复合类型传值(对象传值)
01:导包,配置web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version ...
- 通过struts.xml搭建、为属性注入值_2015.01.04
01:web.xml配置: <?xml version="1.0" encoding="UTF-8"?> <web-app version=& ...
- Sqlserver列出所有数据库名,表名,字段名
Sqlserver列出所有数据库名,表名,字段名 1.获取所有数据库名: ? 1 SELECT Name FROM Master..SysDatabases ORDER BY Name 注 ...
- 50136142WXY的百度地图
50136142WXY的百度地图 [试题描述] 社团里的WXY童鞋今天要出去旅游啦(他现在在北京为1号城市),决定去朝鲜平壤(N号城市).但是很穷的WXY没有钱坐飞机,只好坐汽车去朝鲜了.但是车上的百 ...
- xxxx
http://www.cnblogs.com/zhuojun/p/5747999.html
- MyEclipse下搭建maven项目
由于maven在构建项目方面确实比较出色,现今绝大多数人构建项目都采用maven,而且绝大多数人都采用eclipse作为开发环境,今天我用myeclipse搭建了一个demo,虽然基本上不会采用mye ...
- Pascal's Triangle
class Solution { public: vector<vector<int>> generate(int numRows) { vector<vector< ...
- (转载)PERL 处理CSV
#!/usr/bin/perl#use strict;open(FILE1,"C:/Perl/BX/BX-Users.csv");open(FILE2,"C:/Perl/ ...