Thoughts on Android recent Task

Source: Internet
Author: User

Android uses recent Task Management (which cannot be called management by Android), which has some shortcomings. The system manages the activity as follows:

When the activity is safely overwritten by another activity, it is in the Stop State, which only occupies the memory and does not occupy the CPU time. The process running the task is not killed. When the user switches back to thisProgramYou do not need to load system resources, and the program load is faster. When the memory resources of the new activity are insufficient, the system kill the activity that is not commonly used and releases the memory resources. When the system kill an activity, it will call the activity'sOnsaveinstancestate (bundle) gives the user a chance to save the necessary data. When the user switches back to the killed activity, the onrestoreinstancestate (bundle) of the activity is called) restore the data saved during the previous kill so that the user still looks like the previous interface.

First, the concept of recent task is very good. The system will help you look after the task and manage the memory, making it easier for users to use. You do not need to worry about task management when using applications. If necessary, the system will kill Some uncommon acitiviy and release resources to run new activities. However, this brings about some substantive problems, as follows:

1. Native Android did not provide task management before 4.0. Only recent tasks can be used for task switching. Although the recent task in Android 4.0 has the task manager function, it can only kill the background process containing the activity. It has no effect on the process without the activity and only the service process.

2. Some programs will start the background service to run after receiving broadcast. There is no such process in the recent task and it cannot be managed.

3. some processes have been killed (the exit button is provided by the program, or the task manager is used), but the recent task still exists. Now the name is actually saved, in addition to link to this program, nothing else works.

Some may attack that android is different from windows, saying that it is too dangerous to manage windows tasks. The new concept of Android does not well cater to users' wishes. In addition, Android does not have a good constraint on these programs due to poor programming. For example, if we exit a program, we want the services in the background to be closed together, instead of running services in the background, secretly connecting to the Internet, charging electricity, and charging traffic. I feel that the biggest problem in Task Management in Android is that it cannot control services properly.

 

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.