Android Four Kit ContentProvider

Source: Internet
Author: User

A brief description of how ContentProvider is implemented for data sharing.

A program can completely expose its own data by implementing a content provider abstraction interface, and content providers exposes data in a similar way to tables in a database. Content

Providers stores and retrieves data, which allows all applications to access, which is the only way to share data between applications.

There are 2 ways to make your application's data public: Create a contentprovider of your own or add your data to a content provider that already exists, provided that there is a phase

The same data type and has permission to write to the content provider.

How can I get data exposed by other applications through a set of standard and unified interfaces? Android provides contentresolver that external programs can access the data provided by the ContentProvider via the Contentresolver interface.

Comprehensive

The four components of Android are their role

Activity:

Activity is the windows of Android programs interacting with the user, and is the most basic of the Android building blocks, and it needs to do a lot of persistent things, manage the lifecycle and some jump logic in order to maintain the state of the various facets.

Service

Background services for activity, encapsulation has a complete functional logic implementation, accept the upper instruction, complete the related things, define the need to accept the intent provide synchronous and asynchronous interface

Content Provider:

is a third-party application data access scheme provided by Android, can derive content provider class, provide data to the outside, can choose sort like database, block the storage details of internal data, provide

interface model, which greatly simplifies the application of the upper layer, and provides a more convenient way to integrate the data.

Broadcast Receiver:

Accept one or more intent as triggering events, receive messages, do some simple processing, convert to a notification, unify the Android event broadcast model

Android Four Kit ContentProvider

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.