Go to learn more about the Activity Startup Process (I)-The summary process of Activity startup, go to activity

Source: Internet
Author: User

Go to learn more about the Activity Startup Process (I)-The summary process of Activity startup, go to activity

Author: Cloud Chou. Author: http://www.cloudchou.com/android/post-788.html

 

When an Activity is started in Android, the application where the Activity is located is started first. When an application starts, a process named process in the application package has a main thread, ActivityThread, or UI thread.

This series of blogs will elaborate on the Activity startup process. These blogs are based on Cm 10.1 source code research.

  • In-depth understanding of the Activity Startup Process (2)-class diagrams of the Activity startup classes
  • In-depth understanding of Activity initiation process (3)-detailed process of Activity initiation 1
  • In-depth understanding of Activity initiation process (III)-detailed process of Activity initiation 2
  • Deep understanding of Activity initiation process (4) -- Scheduling Algorithm of Activity Task
Brief interaction process at Activity startup

You can click the application icon from the Launcher program to start the entry Activity of the application. When the Activity starts, interaction between multiple processes is required, the Android system has a zygote process dedicated to incubating the Android framework layer and application layer programs. There is also a system_server process that runs many binder services, such as ActivityManagerService, PackageManagerService, and WindowManagerService. These binder services run in different threads respectively, and ActivityManagerService manages the Activity stack, application process, task.

The interaction process of the Activity at startup is as follows (click the picture to see the big picture ):

When you click the application icon in the Launcher program, ActivityManagerService is notified to start the Activity at the entry point of the application. If ActivityManagerService finds that the application has not been started, the Zygote process is notified to hatch the application, then, execute the main method of ActivityThread in the dalvik application process. The application process then notifies ActivityManagerService that the application process has been started. ActivityManagerService saves a proxy object of the application process, so that ActivityManagerService can control the application process through this proxy object, activityManagerService then notifies the application process to create the entry Activity instance and execute its lifecycle method.

 

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.