Analysis of Android Application Program Running Mechanism

Source: Internet
Author: User
In standard Windows and Linux desktop operating systems, you can run multiple applications in different Windows. Each time only one application is in the current focus state, however, other applications are equal. You can switch each application at any time. When you do not need an application, you also need to close the application.

However, Android applications do not use this method.

In Android, only one application is running at the beginning. In addition to the status bar, the current application will be filled with the entire screen. The most common application is the Home application, which displays background images, application shortcuts, widgets, and so on. You can activate the application here.

When a user runs an application on Android, Android starts the application and puts it at the frontend. From this application, the user can start another application or other interfaces of the application, start one. These programs and screens are recorded in the application stack by the Android Activity Manager. At any time, you can use the back button to return to the previous application screen, this is similar to the browser's Web browsing history function. You can use the back button to return to the previous application screen.

In Android, each user interface represents an 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 disabled. In other words, the lifecycle of an Activity is not bound together with the lifecycle of its process. A process is only a one-time container of the Activity, this is different from standard desktop operating systems in Windows and Linux. In standard Windows and Linux desktop operating systems, you can run multiple applications in different Windows. Each time only one application is in the current focus state, however, other applications are equal. You can switch each application at any time. When you do not need an application, you also need to close the application.

However, Android applications do not use this method.

In Android, only one application is running at the beginning. In addition to the status bar, the current application will be filled with the entire screen. The most common application is the home application, which displays background images, application shortcuts, widgets, and so on. You can activate the application here.

When a user runs an application on Android, Android starts the application and puts it at the frontend. From this application, the user can start another application or other interfaces of the application, start one. These programs and screens are recorded in the Application Stack by the android activity manager. At any time, you can use the back button to return to the previous application screen, this is similar to the browser's Web browsing history function. You can use the back button to return to the previous application screen.

In Android, each user interface represents an 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 disabled. In other words, the lifecycle of an activity is not bound together with the lifecycle of its process. A process is only a one-time container of the activity, this is different from standard desktop operating systems in Windows and Linux.
Related Article

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.