Wirelessly data storage and a brief introduction to ContentProvider

Source: Internet
Author: User

1. Introduction to how Android data is stored

File storage sharedprefrence Storage Conmtentprovidersqlitedatabase Networked Storage 2. Please describe how the next contentprovider is for data sharingIf you want to expose your application's data to other applications, you need to create a content provider. Third parties can access the provider through Contentresolver 3. Why use ContentProvider? What is the difference between it and SQL implementation ?ContentProvider block the details of the data storage, the internal implementation of the user is completely transparent, the user only need to care about the operation of the data URI. ContentProvider can also share data between different apps. SQL also has the method of adding and deleting the search, However, the content of the access is limited to the database files under this application. Contentproivider can also be added or deleted to check local files, XML files and so on. 4. Talk about the relationship between Contentprovider,contentresolver,contentobserver.The first is the content provider, the system can provide additions and deletions to the database file method, the second is the content parser, the content parser can access the content provider through a specific URI, call inside the method of adding and deleting, the last is the content listener, can listen to the changes in the database content, When the content of the database changes, the content listener receives the message and handles it accordingly.

Wirelessly data storage and a brief introduction to 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.