The issue of Android using a task killer has been an ongoing discussion for a while now. In an attempt to free up memory and improve battery life, some users have resorted to the use of third-party task killers. Many claim the use of task killers effectively frees up memory while others claim that it does more harm than good because tasks are killed prematurely. One recent claim of improved phone performance has led me to revisit the topic and share my findings.
I personally do not use task killers. I prefer using startup managers. One such application I use is the Startup Manager app developed by DownloadAndroid.info. It shows me what applications and processes are configured to run during system startup and allows me to disable any process by just unchecking its checkbox from the entry list. I like using SM because, unlike task killers, it allows me to simply set it and forget it.
Obviously, that is not the reason I don’t use task killers. I studied a bit about the Android application lifecycle prior to purchasing my first Android device – in fact, the application lifecycle was one of the many features that attracted me to Android. So why don’t I use third-party task killers? It’s because my Android device is already a task killer – an automated one too.
As described in the Android application lifecycle, one thing that stands out about the platform is the ability to juggle multiple applications at once. Android’s platform has a good multitasking design allowing it run applications well and manage memory efficiently.
Though third-party task killers are helpful for targeting certain processes that are certainly not needed, many applications displayed in the task manager are not necessarily actively using memory resources. The cool thing about the Android application lifecycle is that when the user leaves an application, its process is kept around in the background, allowing it to do other things on the phone if needed. Unlike Windows Mobile devices or iPhones, there is no button to exit the application – hence the intuitive use of the Back and Home keys.
Because memory on a device is limited, Android will prioritize and kill processes that are not needed based on the priority of the process for the user or how long the process has been idle. If the system determines that it needs to remove a process, it kills it.
Even after Android has killed a process, it can be relaunched it to its last seen state because it stores vital parts of the last state at the time the user leaves that part of the application, just prior to its being killed. On the other hand, processes like background music playback, data synchronization, location tracking, and alarm clocks among others need a way to tell Android to do something while not in the foreground.
Here is an 8 minute good video from Google explaining the Android application lifecycle:
Android also utilizes broadcast receivers and services for multitasking management. An example of broadcast receivers are application widgets. Android sends broadcasts when it needs to interact with the widgets. This allows app widgets to be quite lightweight by not needing their application’s process to remain running.
A service, on the other hand, allows an application to implement longer-running background operations to continue running even while in the background, until I say the application sends another broadcast to stop. An application controls when its service runs by explicitly starting and stopping the service. Example of such a service is the music playback which runs in a service to allow it to continue operating after the user leaves the music application.
With an overview of how the application lifecycle works, I hope those who don’t already understand it have a better idea. I feel the issue of using task killers comes down to how well the applications were designed. The Android platform has been designed with the user’s experience in mind – I think it does that well. Instead, awareness of creating better application development practices should be brought to the forefront. The better the app, the more improved performance the device gets. Memory management in apps is key!
A good resource I would advice application developers to checkout is A Beginner’s Guide to Android by Reto Meier.
This is a recorded Google I/O session that revisits the basic concepts involved in Android development. It’s about 55 mins long but it’s worth it. Check it out if you have not already seen it.
Feel free to share your thoughts on task killers, start managers, the application lifecycle process and other related topics! I would love to hear your thoughts.
Sources: Android Development Blog, Reddit