zoukankan      html  css  js  c++  java
  • 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.

    //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.
    ----------- Do not start just casually, and do not end just casually. -----------
  • 相关阅读:
    python3 多线程的基本用法
    ASP.NET MVC下的四种验证编程方式
    漫步ASP.NET MVC的处理管线
    asp.net mvc源码分析-Action篇 IModelBinder
    在 Asp.NET MVC 中使用 SignalR 实现推送功能
    说说Python 中的文件操作 和 目录操作
    Python 用 os.walk 遍历目录
    我来说说MVC过滤器
    学习Python必须要知道的常用模块
    Python中的并发编程
  • 原文地址:https://www.cnblogs.com/yexiant/p/5684010.html
Copyright © 2011-2022 走看看