Android (Java) Learning note 252:contentprovider Using Content Viewer 01

Source: Internet
Author: User

1. Content Viewer

Does not belong to the four components, only the content provider ContentProvider corresponding small function.

If the contents of the database are found to be changed, they will be observed immediately.

Here is the logical diagram:

When the data inside the bank in a application changes, the A application sends the data to a piece of public memory, and the memory watcher reads the data in the public memory. So that the database of a application is changed.

This mechanism is similar to the broadcast receiver principle, but for the broadcast receiver, the application that registers the receiver of the broadcast will receive the broadcast, so the efficiency is not good, so Google encapsulates an API application as: content Observer .

Android (Java) Learning note 252:contentprovider Using Content Viewer 01

Related Article

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.