Content Providers
English Original: http://developer.android.com/guide/topics/providers/content-providers.html
Acquisition Date: 2015-01-07
Article Directory
- Content Provider Basics
- Create Content Provider
- Calendar Provider
- Contact Provider
Related examples
- Contact Manager App
- "Cursor (contact person)"
- "Cursor (phone)"
- 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