Android Doc Content Providers 中文

  • Android,contentprovider,翻译,中文,官方文档,

Content providers store and retrieve(检索) data and make it accessible(可进入的) to all applications. They're the only way to share data across(穿过) applications; there's no common(普通) storage area that all Android packages can access.


Android ships with a number of content providers for common data types (audio, video, images, personal contact information, and so on). You can see some of them listed in the android.provider package. You can query these providers for the data they contain (although, for some, you must acquire the proper(适当的) permission to read the data).


If you want to make your own data public, you have two options: You can create your own content provider (a ContentProvider subclass) or you can add the data to an existing provider — if there's one that controls the same type of data and you have permission to write to it.


This document is an introduction to using content providers. After a brief(简要的) discussion of the fundamentals(基础), it explores how to query a content provider, how to modify data controlled(控制) by a provider, and how to create a content provider of your own.

Content provider basics

Querying a content provider 查询

Modifying data in a provider 修改provider

Creating a content provider 创建provider

Content URI summary


- EOF -

转载请注明:文章转载自 Binkery 技术博客 []
本文标题: Android Doc Content Providers 中文