Android question and Answer question

Source: Internet
Author: User

1. Does SQLite support the business? How does adding a delete improve performance?

SQLite as a lightweight database, support transactions, improve performance can be considered through the original optimized SQL query statement processing, if it is a bulk operation, can be placed in a transaction to improve performance.

2. Why use ContentProvider? What is the difference between it and SQL implementation?

the reason for using it is to enable sharing of data between different applications.

The same point as SQL : its bottom layer is implemented with the SQLite database, so its various operations on the data are implemented in SQL, but the upper layer is provided with a URI.

Unlike SQL : the details of the data store can be masked, completely transparent to the user, and the user only needs to be concerned with the URI of the operational data, so from a security standpoint, the use of ContentProvider is superior.

3. Please explain the relationship between message, Handler, message Queue, Looper in a single-threaded model.

Simply put, handler gets the Looper object in the current thread, Looper is used to remove the message from the MessageQueue that holds the message, and then handler to distribute and process the message.

Android question and Answer question

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.