More than once, more than one person asked this question. I answered: No. However, we still need to record it.
We may explain the cause from understanding some internal mechanisms of the system for application management.
For Android systems, "processes" and "services" are included "." Processes "are running, and some are just left cached in the background ." "Service" is a non-interface, long-running application function, and will not be easily terminated.
We know that in Android, you can quickly exit the application by using the Home key or the return key.
Home key:
On any page of the currently running application, press the Home Key to quickly return to the mobile phone home screen. At the same time, the process of this application will be suspended in the background and the cache will be created. When you start the application again, you can easily return to the interface just now. (Retained on site)
Of course, when you press the Home Key to return to the home screen of your mobile phone, one or more processes and services may run in the background due to design requirements, to ensure that this application is "active" in the background ". (For example, when the music is being played)
Although we know that the background will produce a variety of "processes" and "services", you don't have to worry that they will drag your mobile phone down. When a new application runs and finds that the memory is insufficient, the system automatically releases some processes cached in the background to ensure that new applications can run. This is an intelligent and benign supply system.
Return key:
Android uses the return key to exit the screen, and closes the dialog box, menu, and keyboard.
For traditional local client applications, each screen can be understood as an activity ). The Return key can be used to quickly roll back to the previous activity of the current application, or to leave an activity of a new application opened by the current application.
All activities are in a stack structure (a serial data structure), and running activities are at the top. When you press the return key, the current activity is cleared and the previous activity is resumed. The following figure shows an example of [Figure 1:
Figure 1 (Source: http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html)
If you press the return key consecutively, the activity is extracted one by one, just like peeling an onion.
In Android applications, you can use the intent function to start an activity of another application (task) in an activity of the current application (task.
For example, in Figure 2, click Hyperlink and feedback on the "youdao Dictionary" main interface to open a browser to access the target webpage:
Figure 2]
On the target webpage page, you can use the return key to quickly return to the "youdao Dictionary" page.
In the following example, the experience is very bad:
Figure 3]
See Figure 3. It takes several times to return the previous task on the target webpage. Go back to the browser's browsing history over and over again, and even go back to the browser's start page. Then, a dialog box pops up asking if you want to exit. Oh, my God! I'm going crazy.
For the activity stack processing mechanism between multiple tasks, see Figure 4 below for explanation:
Figure 4 (Source: http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html)
We can see that at the beginning, "Task B" "activity Y" in the background is directed to the foreground through a button in "Activity 2" of "task, as "Task B" activities are separated one by one, the entire "Task B" is terminated, and the Return key is used to return to "Activity 2" of "task ″.
Of course, an application can decide which activity to call will end. For example, in figure 4, after "Task B" is transferred to the foreground by "Activity 2" of "task a", you can decide to end at "activity Y, the user does not need to go through the previous "activity X" of "activity Y ". Otherwise, the user will be reluctant to go through other activities unrelated to the current task.
The Return key facilitates the quick return after a new task is called, instead of returning to the Application List and finding the previous application to start again.
When all activities are cleared from the stack, the task ends. That is to say, when you press the return key on the main interface of the application, the application has exited.
Unless this application is designed to run processes and services in the background. For example, "Sina Weibo", even if you press the return key on the main interface of the application to exit, you can still see running processes and services on the "program management"> "running" interface. (You need to use the menu key to switch to the "display currently running services" view)
As mentioned above, the background service is a non-interface, long-running application function and will not be easily terminated. Even if you use a third-party "Task Manager" to end processes and services, processes and services may be automatically restarted. (In fact, you can find it on the "service" interface and stop the service manually, but there is no need for this. You can submit it to the system for automatic processing .)
Now, we know why the android application does not need to exit manually. Because smart systems have helped users do many things, including exiting applications and restoring available memory.
Due to the official Android attitude towards design specifications, Android does not explicitly tell the designers that they do not need this. Therefore, the design model of Android applications is "Blooming in full bloom", which makes it difficult to form a unified experience. For example, the topic mentioned in this Article does not need to manually exit the Android Application. It is a funny thing to see a button to exit the application on the screen in IOS.
In any case, for Android or IOS, users do not need to focus on processes, memory management, and task management. Use up, just leave the interface, it's so easy! Throwing a user's questions that do not need to be noticed is tantamount to "not wanting the child to get angry, but giving him another lighter ."
Designers, what should we do. Change it!
Here, you may ask: Since the Android app is suspended and paused in the background, why is it still slow when the app is opened more often?
On the one hand: New applications that require large memory will naturally be slow. In addition, if the memory of the mobile phone itself is too small and the CPU is not powerful, the system will naturally automatically stop the process and release the cache, causing the mobile phone to run slowly in some cases.
Because of this, we know why "Task Manager" is so popular and even becomes "essential for installation ". People use it to quicklyAdvanceRelease the cache to ensure that there is sufficient memory to run the new application. Of course, as the CPU frequency increases and the memory size increases, manual cache cleanup has gradually become unnecessary.
On the other hand, the background services temporarily started may slow down the mobile phone. Some applications automatically start listening to specified events in the background, such as the "Google service" of the operating system, or the "pea pod mobile phone Genie" connected to USB and started on the PC ", the "pea pod daemon" on the mobile phone will automatically start. To avoid this situation, we recommend that you install the application selectively. Smart software requires advanced hardware.
Maybe you will ask: Since the app can exit the app directly with the return key on the main interface of the app, why does an Android app (especially in China) Bring up the exit confirmation dialog box?
They often say it is to prevent user misoperations, but it is totally redundant because there is sufficient recovery guarantee. The real reason is that the product owner does not want their applications to be "exited" by the user easily, which adds a barrier to the user. It seems to me like an excuse to worry about misoperations.
Look at the current PC software! After clicking the X icon in the upper-right corner of the window, many software are doing the same thing.
This is a typical practice of shirking responsibility to users. It seems to be warning the user: "Are you sure you want to quit? If you are sure, I will ignore you !"
We shouldUse as few dialog boxes as possible to provide necessary fault tolerance support.Allow users to make mistakes and give them recovery opportunities. For example, you can allow users to return to the site again after they press the return key to leave the application. This is reflected in many excellent third-party applications, such as Twitter, chat ......
Of course, except for immersive applications. For example, if a video is being played or a video is being played in a game, do not try to prevent users from making mistakes.Immersive applications should provide immersive experience protectionBecause half of a game or video is exited, it is often impossible to return to the scene.
Finally, the "exit" mentioned in this Article refers to exiting the application, rather than logging out of the account. If your application requires the user to log on using the account and password, it is necessary to provide the "logout" (or "logout") function.