Resolve the Android application execution mechanism

  • 2020-05-19 05:53:48
  • OfStack

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

But Android's applications don't take this approach.

In Android, only one application at a time is running at the front, and the current application will spread over the entire screen except where the status bar is. The most common application for users is the home page of the application (Home application), which mainly displays the background image and application shortcut, Widget, etc., where users can activate the application.

When the user runs an application in Android, Android starts the application and puts it on the front end. From this application, the user can launch other applications, or other interfaces of the application, one for each. These programs and screens are recorded by activity management (Android Activity Manager) in the application stack (application stack). At any time, users can use the back button to return to the previous application screen, which is similar to the browser's web browsing history function 1. Users can use the back button to return to the previous application screen.

Within Android, each user interface represents an activity class (Activity Class), each activity has its own lifecycle, and each application has one or more activities.

In Android, every application is "active" even after its process is shut down. In other words, the life cycle of its active (Activity) and the life cycle of its process are not tied together in 1, the process is only an active container, which is different from standard desktop operating systems like Windows and Linux. In the standard Windows and Linux desktop operating systems, multiple applications can be run in different Windows at the same time, with only one application in the current focus state at a time, but all other applications are in an equal position. Users can switch between each application at any time and need users to close the application when it is not needed.

But Android applications don't take this approach.

There is only one application running at a time in Android, and the current application will be spread all over the screen except where the status bar is. The most common application for users is the home page of the application (Home application), which mainly displays the background image and application shortcut, Widget, etc., where users can activate the application.

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

Within Android, each user interface represents one activity class (Activity Class), each activity has its own lifecycle, and each application has one or more activities.

In Android, every application is "active" even after its process is shut down. In other words, the life cycle of its active (Activity) and the life cycle of its process are not tied together in 1, the process is only an active container, which is different from standard desktop operating systems such as Windows and Linux.


Related articles: