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.