Android start_activity Process

Source: Internet
Author: User

Well, using the tools described in the previous article, we tracked down the flow of startactivity in System_server, as follows:

The picture below are the flow chart for how the source activity start a target activity

Major includes four steps:
(1) Preparation, flow chart in Blue;
(2) Suspend the source activity, in yellow;
(3) Start the target application process once not yet created, also create the
Activity Thread, in aubergine;
(4) Attach the target activity thread to application, in Red, in this step,
Application OnCreate and Activity onCreate are invoked.


System_server in the activitystack is very heavy, which maintains the state of all the activity of the stack, due to the time relationship, no in-depth study. Application's oncreate is primarily to create a context that is rooted in the various components on this application.

A little bit of experience is that if you want to better understand, you must go to debug tracking, look at other people's blog is always a reference, and easy to doze.



Android start_activity Process

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.