This article is original and must be reproduced with the following source:Http://blog.csdn.net/qinjuning
In the previous blog <Analysis on the Communication Model Between activitymanagerservice and application (client) in Android>, We have a grasp of the macro architecture.
The basic model for activitymanagerservice to communicate with the application. We will continue to analyze the startactivity, that is, the process for starting an activity.
Because we need to process a lot of related data states, startactivity is still a bit complex in general, but we understand the basic principle and understand it step by step,
It is also just so.
First, we can understand the macro process of startactivity from the flowchart:
Now, I am ready to sort out the startactivity () process flow and related function functions from the perspective of code reading. Later I found that the function is too large,
If you are not easy to learn, leave it for later. We recommend two resources that I often see:
1 ,《Android Kernel Analysis(Books-the ladder of human progress)
2. Luo's 《Source code analysis during Android app startup"
(Based on Android 2.3)
It's just a chat. I hope you can read the source code carefully. This is the case for everyone.