Android and android Official Website

Source: Internet
Author: User

Android and android Official Website
Main Components of Android applications


Address: http://blog.csdn.net/caroline_wendy


Android applicationsIt consists of five main components:Activity, intent, service, broadcast receiver, and Content Provider);
1. Activity is similar to a webpage. Activity is the appearance of an application. The cost of starting an Activity is as follows: creating a Linux Process, allocating memory to the UI, filling the layout, and setting the interface;Activity manager)Creates, destroys, and manages activities, and automatically processes memory. Startup status: memory is not started; running status: Keep focus; paused Status: Not keep focus, clearly visible; stopped status: Activity invisible, in memory; destroyed status: it is not in the memory; if the stopped activity is destroyed, it will not go through the destruction state. Try to keep data when onStop (), instead of onDestroy (). Activity and Fragment belong to the category of Activity.
2. intention (Intent) is similar to webpage jump link, dividedDisplay and implicit.
3. The Service runs in the background without any user interface. Only three statuses are started, run, and destroyed. Choose Start> onCreate () + onStart ()> RUN> onDestroy ()> destroyed. A time-consuming operation must start oneSeparate thread.
4. Content Provider)CRUD (create, read, update, delete) PrinciplesThe following principles apply to the Contacts Provider, Settings Provider, and Media Store. Data storage can be separated from the user interface, easy replacement program;
5. Broadcast Receiver Android full systemPublishing/subscription Mechanism. For example, alarm> broadcast intent> broadcast receiver> intent> Update Service.




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.