SoFunction
Updated on 2025-03-01

Analyze the Android application running mechanism

In standard Windows and Linux desktop operating systems, multiple applications can be run in different windows at the same time, with only one application at the moment being the current focus state, but other applications are in an equal position. Users can switch each application at any time, and when no application is needed, users are required to close the application.

However, applications of Android operating system do not use this method.

There is only one application running at the front at each time in Android. Except for the status bar position, the current application will fill the entire screen. The most common application for users is the homepage of the application. This program mainly displays background images, application shortcuts, widgets, etc., where users can activate the application.

When a user runs an application on Android, Android launches the program and puts it at the front end. From this application, the user can launch other applications, or other interfaces of the application, launches one by one. These programs and screens are recorded in the application stack by the Android Activity Manager. At any time, the user can use the back button to return to the previous application screen, which is a bit similar to the browser's web browsing history function. The user can use the back button to return to the previous application screen.

Inside Android, each user interface represents an activity class, each activity has its own life cycle, and each application has one or more activities.

In Android, every application is "active", even after its process is closed. In other words, the life cycle of its activity and the life cycle of its process are not bound together. The process is just a one-time container of the activity, which is different from standard desktop operating systems such as Windows and Linux. In standard Windows and Linux desktop operating systems, multiple applications can be run in different windows at the same time, with only one application at the moment being the current focus state, but other applications are in an equal position. Users can switch each application at any time, and when no application is needed, users are required to close the application.

However, applications of Android operating system do not use this method.

There is only one application running at the front at each time in Android. Except for the status bar position, the current application will fill the entire screen. The most common application for users is the homepage of the application. This program mainly displays background images, application shortcuts, widgets, etc., where users can activate the application.

When a user runs an application on Android, Android launches the program and puts it at the front end. From this application, the user can launch other applications, or other interfaces of the application, launches one by one. These programs and screens are recorded in the application stack by the Android Activity Manager. At any time, the user can use the back button to return to the previous application screen, which is a bit similar to the browser's web browsing history function. The user can use the back button to return to the previous application screen.

Inside Android, each user interface represents an activity class, each activity has its own life cycle, and each application has one or more activities.

In Android, every application is "active", even after its process is closed. In other words, the life cycle of its activity and the life cycle of its process are not bound together. The process is just a one-time container of the activity, which is different from standard desktop operating systems such as Windows and Linux.