Parsing Android application running mechanism _android

Source: Internet
Author: User

In a standard Windows and Linux desktop operating system, you can run multiple applications in a different window at a time, with only one application being the current focus state, but other applications are an equal location. Users can switch each application at any time and require users to close the application when they do not need it.

But this is not the way the Android OS apps are used.

With only one application running at the top of Android each time, in addition to the status bar position, the current application will be covered with the entire screen. The most common application of users is the home application, a program that displays background maps and application shortcuts, widgets, and so on, where users can activate applications.

When a user runs an application on Android, Android launches the program and puts it on the front end, from which the user can start a different application, or apply its own other interface, one to boot. These programs and screens are recorded in the application stack (application stack) by activity Management (Android activities manager), and at any time, users can use the Back button to return to the previous application screen. This is a bit like the browser's web browsing history feature, and users can use the Back button to return to the previous application screen.

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

In Android, each application is "active," even after its process is closed. In other words, the life cycle of its activities (activity) is not tied to the lifecycle of its processes, but the process is only a one-off container for the activity, which is different from the standard desktop operating systems of Windows and Linux. In a standard Windows and Linux desktop operating system, you can run multiple applications in a different window at a time, with only one application being the current focus state, but other applications are an equal location. Users can switch each application at any time and require users to close the application when they do not need it.

But this is not the way the Android OS apps are used.

With only one application running at the top of Android each time, in addition to the status bar position, the current application will be covered with the entire screen. The most common application of users is the home application, a program that displays background maps and application shortcuts, widgets, and so on, where users can activate applications.

When a user runs an application on Android, Android launches the program and puts it on the front end, from which the user can start a different application, or apply its own other interface, one to boot. These programs and screens are recorded in the application stack (application stack) by activity Management (Android activities manager), and at any time, users can use the Back button to return to the previous application screen. This is a bit like the browser's web browsing history feature, and users can use the Back button to return to the previous application screen.

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

    in Android, each application is "active," even after its process is closed. In other words, the life cycle of its activities (activity) is not tied to the lifecycle of its processes, but the process is only a one-off container for the activity, which is different from the standard desktop operating systems of 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.