Android-android Application Main Components

Source: Internet
Author: User

Android Application main components


This address: Http://blog.csdn.net/caroline_wendy


Android Apps consist of 5 main components: Activities, intentions (intent), services (service), broadcast receivers (broadcast receiver), content providers (contents Provider);
1. Activities (activity)like a Web page, an activity is the appearance part of the application, the cost of initiating the activity: Creating a Linux process, allocating memory for the UI, populating the layout, setting the interface; Activity Manager is responsible for the creation, destruction, and management of activities, and automatically handles memory. boot status: Boot not into memory;Operating Status: Keep Focus;paused state: Not keeping focus, clearly visible;Stop state: The activity is not visible, in memory;destroy state: not in memory;when the stopped activity is destroyed, it is not destroyed and the data is kept as far as possible at OnStop (), rather than OnDestroy (). activity,fragment all belong to the category of activities.
2. Intention (Intent)a jump link similar to a Web page, divided into display and implicit .
3. Services (Service)The service runs in the background without any user interface. Only start, run, destroy three states,launch, OnCreate () +onstart (), Run, OnDestroy (), destroyed;a time-consuming operation requires a separate thread to be started.
4. Content provider (contents Provider) CRUD (create,read,update,delete) principle ,the contact provider (Contacts Provider), the settings provider (Settings Provider), and the media store are all followed by this principle;can be the data storage and user interface separation, easy to replace the program;
5. Broadcast receiver (broadcast receiver)Android Full system Publish/subscribe mechanism . For example, the update service, intent, broadcast receiver, radio intent, alarm.




Android-android Application Main Components

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.