Android Development-api Guide-content Provider

Source: Internet
Author: User

Content Providers

English Original: http://developer.android.com/guide/topics/providers/content-providers.html
Acquisition Date: 2015-01-07

Article Directory
    1. Content Provider Basics
    2. Create Content Provider
    3. Calendar Provider
    4. Contact Provider
Related examples
    1. Contact Manager App
    2. "Cursor (contact person)"
    3. "Cursor (phone)"
    4. Sync Adapter

Content Provider controls the access to structured data, and is responsible for the encapsulation of data and the protection of data security mechanisms. Content Provider is a standard way to access other in-process data using code.

If you want to access the data in content Provider, you need to use Context the object in your application ContentResolver as the client that communicates with content Provider. The ContentResolver object is responsible for communicating with the Content Provider object (an instance that implements the ContentProvider class). The Content Provider object receives the client's data request, executes the corresponding Action, and returns the result.

If you're not willing to share data with other applications, you don't need to develop your own Content Provider. However, if you need to provide custom search suggestions in your own application, you must use your own Content Provider. If you want to copy and paste complex data or files to other apps, you need to implement your own Content Provider.

Android itself has provided some Content Provider for managing data such as audio, video, images, and personal contacts. android.providerSome of the packages are listed in the reference documentation. Any Android application can access these Content Provider in accordance with certain restriction rules.

The following article describes the Content Provider in detail:

Content Provider Basics
Access data that is stored in the Content Provider in a tabular format.
Create Content Provider
How to create your own content provider.
Calendar Provider
Visit the Calendar Provider of the Android system.
Contact Provider
access the Contacts Provider of the Android system.

Android Development-api Guide-content Provider

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.