yashsingh1/xdaforums huggingface dataset:
[Nexus One General] Paul22000:
It's kind of like using the Task Manager in Windows to kill programs. How often do you need to use it to kill programs: every single time you need to exit a program, or can you just hit the X for most things successfully? Sure you may need to kill a crashed program once every few weeks or whatever, but not day to day and not for every program you need to exit. It's the same in Android; use it when necessary, not for normal operation.
[Nexus One General] nexusdue:
No. It's not. Especially on 2.1 the difference was 20-30% battery life difference over the course of a day. (in the evening I would rarely be below 70%)

Since the upgrade to 2.2 (where auto task killers no longer work properly) battery life after 1 day of light usage is ALWAYS below 50%. ALWAYS! Amazon MP3, My uploads, and all that other crap that keeps popping up cost you at least 20-30% battery life ... task killers can prevent that.
[Nexus One General] RogerPodacter:
Those apps simply don't use any resources. I leave all that crap run every day. Today I still had 100% battery 2.5 hours after I unplugged, and was at 95% after 4 hours. With that stuff running. And in system panel monitoring, or OS manager, those apps show as using 0 seconds of CPU after a full day of use. Meaning they haven't touched the CPU to do even a single thing.

Been doing it for months and just what I've seen.
[Nexus One General] amoldhapare:
thats what i did.........task killer hang phone than helping it to run faster..................perfect post.........
[Nexus One General] y2kshin:
Excuse me,,how about app that using internet access, does it still conserve data?

And one thing is bother me is like this, example i open news just curious what is news.than i will never open it anymore, it is very annoying n bother me to see the news app in the task list.it is affect us mentally imo..
[Nexus One General] :
I run two taskkillers, one to kill all my tasks and another to kill my task killer. The first task killer then kills the second task killer when it comes back.

It's pretty awesome, I feel so powerful micromanaging my phone, no one man should have all that power.
[Nexus One General] khaytsus:
It running silently in the background affects you mentally..

Well, I guess we can't argue with what affects you mentally....
[Nexus One General] ChongoDroid:
I let android figure it out but keep a tk for rogue apps. Delete the bloatware, clean your cache every few days and you should never experience lag
[Nexus One General] djmcnz:
I used to do that but didn't find it killed enough system processes so I never had more that 200MB free, totally unused, redundant memory... :(

I found a solution though...

Now I use two task killers like you and a low memory killer set to custom-super-aggressive! I always have like 312MB free, redundant ram for any app to use! :eek: :)

So, the first TK to kill my tasks, the second to kill my first TK which kills the second TK when it restarts ALL (and this is really the cherry) sitting on top of custom-super-aggressive low memory killer settings which kill everything when anything uses more than a few MB (including the TK's of course).

My problem: reconfiguring it now when I change roms.

My anticipated solution: I'm going to use a Task Killer as my launcher... this way, EVERY time I tap on an app it will get killed and use no memory.
[Nexus One General] djmcnz:
Sound advice.
[Nexus One General] :
Brilliant!
[Nexus One General] djmcnz:
Thanks for the support, it spurred me on...

Attached for all is Advanced Task Killer (Free) Launcher.

Install as per usual, press the Home key and only select as your default launcher when you know you want to use it to solve all of your memory problems.

Current market version (@ 27/10), resigned so it will install alongside Advanced Task Killer so you can all use one to kill the other!

Feedback appreciated! Memory stats a help!
[Nexus One General] ChongoDroid:
Killing a tk with another tk is the silliest thing I've ever heard on xda... Apps take up internal space... Thus having 2 tks is a waste of space.
[Nexus One General] :
This is my new plan, with scripts and atk combo.

On boot:

-Load atk, kill all apps

-load atk2 to kill atk 1

-Load launcher

After I choose my desired app i wanna run another script that does this:

-Kill atk2

- -rm ALL apps from /system/app/ and /data/app/ (except for one service call MAXFREEMEM)

What MAXFREEMEM does is after you finish using the app you picked above, it will REINSTALL everything in /system/app/ and /data/app/ so you can move on to your next task, in which the entire process starts over again.

This will guarantee MAX FREE MEMORY
[Nexus One General] djmcnz:
I beg to differ... it's the second silliest thing you've heard on XDA... the first is that you actually need a task killer to get Android to run well... ;)
[Nexus One General] ChongoDroid:
Mm it's saved me a few times, with rogue apps and what not but it's not necessary thats for sure.
[Nexus One General] ChongoDroid:
Max free memory lol... For what?

Android runs apps as it needs to and will relaunch the app after you've killed it thus using cpu... I wouldn't be surprised if your battery life is horrible.
[Nexus One General] :
The real question is why would you NOT want MAX FREE MEM?
[Nexus One General] djmcnz:
You didn't read his post properly, actually it's quite an ingenious solution for exactly that reason, the apps simply can't restart!

It's elegant and obviously totally unobtrusive.
[Nexus One General] ChongoDroid:
I apologize, I'm not sure how this works but I'll follow this post with more interest now haha. +1 for android ingenuity
[Nexus One General] djmcnz:
No, don't worry... we were just playing.
[Nexus One General] ChongoDroid:
Haha this why android rules... Theirs so many ways to achieve whatever it is that you want from your smart phone! Including max free mem lol
[Nexus One General] MountainDrew:
I'm going to crack open my N1 and cut all the write traces to the memory chips. If apps can't write to RAM, I'm guaranteed to have completely free memory at all times!

:p
[Nexus One General] :
You could run a toggle switch to the trackball for optimal selective use.

/me adds another project to his list.

We were?

I'm also thinking of using an empty SD card as a swap disk, that'll net me up to 32gb of more FREE MEM.

With the battery savings, I can procure a small mah battery and shove like three more 32gb micro sd cards.

100 + GB of free mem.

*drool*
[Nexus One General] ChongoDroid:
LoL more free mem then your body has room for!
[Nexus One General] relax24:
What about using AutoKiller, which isn't a task manager but edits the way Android manages ram. I've set mine to Aggressive
[Nexus One General] 4st3risk:
Try this:

1. Start Gameloft Settlers

2. Hit Home key

3. Wait for a day

4. Check Battery usage

5. See your stupid self witnessing 50%+ battery drain by dumb Settlers from Gameloft.

Task killers are made for half-ass optimized apps and there are alot of them on Android market, thanks to Google. Just 'cause somebody doesn't know how, when and where to use task killer, it doesn't mean that they are useless.

Just my 1.5 cents.
[Nexus One General] khaytsus:
Kinda like not knowing how to exit an Android app? Back key.
[Nexus One General] OzCDN:
And if you had read any part of this thread you would have noticed that everyone agrees, including the OP, that TKs are occasionally needed for rogue/badly written apps.

But thanks for educating all of us 'stupid selves'. Geniuses like you don't come along every day.
[Nexus One General] Aztriltus:
Thumbs up. I've been using the TKs to kill specific apps and that saves tons of battery.

And also by pressing the back button all the time, it just gets annoying if some apps just continue to hog on your battery even though you've exited them. IMO, just spend a bit of time to find which apps need some killing.
[Nexus One General] malhotraraul:
thanks man, killed my TASK KILLER right away :)
[Nexus One General] doc_v15:
Paul, regarding to what you have said about the automatic killing task from android to fre up ram, what do you think about "MinFreeManager" ?
[Nexus One General] Jack_R1:
Since Froyo came, autokiller management (minfree etc) is useless in devices with enough RAM (and Nexus has enough), since Froyo kills tasks by OOM_ADJ count way earlier than the memory autokiller can engage on its aggressive setting.
[Nexus One General] Paul22000:
Yup, exactly.

The only task killer you need is something like Watchdog, which alerts you when runaway apps are using 50%+ CPU (the # is configurable).

Link: http://www.appbrain.com/app/watchdog-task-manager-lite/com.zomut.watchdoglite
[Nexus One General] sblar:
Another interresting article on the subject:

http://android-developers.blogspot.com/2010/04/multitasking-android-way.html
[Nexus One General] daijizai:
TL;DR all but the first and last pages of this thread, so forgive if this was already addressed, but to the users who indicated poorly programed games are the the reasons for task killers I would encourage you STILL to use the Android stock and standard options. There is a task killer built in to Android. Make it work for you.

If you have a process thumping through your battery, first consider uninstalling it and reporting the problem to the developer. Second, kill it under 'Manage Applications' in androids settings menus.

Please notice the 'Force Stop' option in the attached image. There really is no reason for a third party task killer.
[Nexus One General] doomed151:
Even after reading this, I would still use task killers.

I don't like it when I launch an app, it continues from previous state.

Whenever I'm done messing around, I just kill all non-system tasks and lock it.
[Nexus One General] pfmiller:
That's not a problem if you exit the app properly using the back button.
[Nexus One General] khaytsus:
I bet you check the locks on the doors at night 10 times too?
[Nexus One General] ruchern:
That's because you pressed the home button instead of back button.
[Nexus One General] ruchern:
There you go, serious user problem.
[Nexus One General] Shahpur.Azizpour:
By the way: seems like we will get a "real" stock task manager app with the gingerbread update (so no more going to apps list and into details view to force close an app).

So while i stopped using advanced task manager (only use case for me was to kill rogue apps), it seems like having an task manager is not COMPLETELY nonsense as some people might suggest. Otherwise google wouldn't have implemented this for gingerbread...
[Nexus One General] pfmiller:
Where are you seeing that? I don't see it in Gingerbread from the SDK.
[Nexus One General] djmcnz:
I think will be just be an easier interface for the existing App Manager

http://www.connectedinternet.co.uk/2010/12/07/android-23-gingerbread/
[Nexus One General] codesplice:
Yeah, Android has always had its own task/app manager. It's got the memset functionality (which establishes thresholds for terminating background apps to convert their memory to usable cache), and the "Force Quit" option from System --> Applications --> Manage Applications menu.

I believe Gingy just cleans it up a bit, and maybe sets more aggressive memset thresholds.

What IS completely useless is an aftermarket task manager that effectively fights against the Android memory management system - which is what pretty much every third-party app manager does (with the exception of AutoKiller, which just provides a GUI for adjusting the memset thresholds).
[Nexus One General] teh_lorax:
Do you still think the moon is made of cheese too?
[Nexus One General] codesplice:
Only when he's not looking at it. He uses the Shrodinger Task Manager :p
[Nexus One General] wang1404:
Well I discovered this like you did. But instead of quitting an app your using then select on the browser, you can just hold the menu button then go right to the browser, that way the page is still there I believe.
[Nexus One General] devis:
I'm very new to Android... the Nook Color is my first actual device. I messed a little with the Android project for my TP2 but the lack of sound, BT and speed sorta killed it for me.

Well, wrong as I may be I find task killing very beneficial. Now this may be a Nook specific issue but when I've got maybe 6-7 apps in the background the device stutters. Internet, games, it's quite sluggish in general. Killing the tasks I don't need brings it back to full power immediately.

And no, the moon isn't made of cheese.

Just like there is no such thing as a one size fits all.
[Nexus One General] teh_lorax:
How do you know you're posting on an Android forum? Quantum physics jokes. LOL
[Nexus One General] crankybot:
I agree. Tasks kill themselves naturally. A task killer just makes it slower.
[Nexus One General] RogerPodacter:
i still am very confused about how the android lifecycle apps work. for example, let's say i open google listen, then view my list items, and i go into a specific episode. now i minimize to the homescreen by pressing the home button.

if i come back to listen within a few minutes, it sometimes goes back to that exact episode i had opened. if i wait 5 minutes, sometimes the entire app starts back at the beginning. it seems to do it randomly, and random times, and not any specific method.

what mechanism tells that app to load back to the beginning?

what tells it to stay at the specific episode?

i'm assuming onDestroy is called which takes it back to the beginning. but when, why, and how long? the time between minimizing the listen app, and coming back minutes later, i did not necessarily load any other app in between, or do anything intensive that would shuffle around process thread memories. but even if i did, why sometimes would it work one way and other times a different way?

how exactly are the lifecycle functions working on android?!!? it truly is something i've never been able to grasp.

another scenario, the engadget app (which i'll admit probably is not coded right). but lets say i browse engadget app articles, go into an article, then into the comments section. now i get a new email notification, so pull down status bar, click the email which places the gmail on the top of the application stack. read the email, then back out with the back button to the comments section in the engadget app. nope, the comments now must reload.

even stranger, same scenario, reading comments section in the engadget app. press home button to minimize engadget app. scroll homescreen, open up something random, then back out of it, and go back to engadget app. the comments are still there already loaded. but sometimes they in fact must re-load. why and how are these different? what mechanism is causing and making the decisions like this? surely there should be some time limit attribute that says if the user used app X and Y within the last 1 minute, to not close that app thread.

and my above sceario, when the gmail notification came thru, and by going to it i placed the gmail app on top of the engadget notification stack, from the developers docs i read, all apps currently part of the visible app stack that the user is currently viewing on screen are supposed to be preserved of highest priority above all else in the OS at that moment.

anyone have insight?
[Nexus One General] OferR:
Android life cycle is fairly simple. Apps which are being used will be kept running in the background and thus preserver their state for as long as possible. This is true only if you start a new app without exiting the running one (e.g. Gmail notification, Home button etc.). If you exit the app using numerous back button taps, the state is not preserved. (Even in this case the app is still in memory until garbage collected or is reused as a fresh start).

Here comes the interesting bit...

The behavior of a resumed app (i.e. went to Gmail and came back to app) is entirely dependent on the developer. Android gives the developer some level of automation in this 'resume' process, such as preserving the state of the app display, when resuming an app which is still in running in the background. However, the developer must manually preserve other states that are unique to his/her app. This is especially true if the app had to be stopped (because Android requires the memory space) and then restarted. In this case, the developer must start its app and bring it (programatically) to the state it was before.

To complicate the issue, Android has app processes called Services. These services have higher priority and are not removed from memory often. However, they have a similar behavior in terms of Android life cycle and the requirement that the developer deals with parts of it manually (i.e. has to develop code).

Now, take the example of a typical media player (Google listen). Such an app has the user interface (the app) and the media player itself (a service). This allows you to keep listening to music while reading mail knowing that the player (the service) is not likely to be stopped. However, it makes the developer's work even more complicated if for example, the app is stopped and restarted, and has to search for the service that is already there and sync with it (e.g. show the correct play time).

The bottom line: most of the peculiar behavior you are experiencing is a result of the developer's actions (or lack of actions) rather than a pure Android life cycle behavior.

Google listen's developers may have decided for example, that if you go back to the app after 3 minutes they will continue the show from the point you existed the app, and if you go back after an hour, you are likely to want to watch something else. However, the behavior you see may be a result of the Service's connection to the online media timing out, and the developer's not developing code to resume the exact location, or even, depending on the type of media, not being able to resume the media in a specific location, thus replaying from the start.

Your Engadget example is likely to be a case of a developer not doing the job right. (Sorry Engadget. Correct me if I'm wrong :-) )
[Nexus One General] RogerPodacter:
Thanks. Maybe I should have phrased my question more specifically. I did write an app, and used onPause, onResume, onStop, onDestroy and onCreate (obviously). I also added in onSavedInstanceState to test how it too works. It was a simple app, had to handle pausing my app's handler runnable and all. I got myself pretty solid understanding the app stack, using the back button to back out of the activity and "exiting" that process thread vs home button, all that.

I guess my question is specific to how exactly the garbage collection works. The engadget app example, while I totally agree they didn't write that app properly. The life cycle functions are not used properly, or at all. So that brings me back to my question, how do I get different results of minimizing engadget, going right back to it, and one time it could reload while the other time it didn't close its thread. Both these times I only minimized the app for 1 second then came immediately back to it.

How does the OS handle these running thread processes specifically? That's kinda what I'm after. Thanks:-)
[Nexus One General] OferR:
Assuming you do not exit engadget using the back key and assuming your phone is not highly loaded, then the answer is within the app logic and not to do with the OS.

There can be many ways of getting seemingly unpredictable results in an app.

If you can provide the exact steps you take to produce the unpredictable results I will have a look at the engadget app and give a more educated guess (even if I can't actually recreate the problem)
[Nexus One General] Paul22000:
It's difficult to say because it depends on what else is happening on your phone at the time. Android kills tasks when it needs the resources, so it really depends on what else you're doing.
[Nexus One General] RogerPodacter:
I'll put together some steps today to try to create what happens. But my phone is typically running for a few weeks at a time, so RAM is thoroughly swapping out processes according to whatever algorithm android uses (quite efficiently I think). RAM hovers around 50-100Mb free. Right now I've been running 10 days straight.
[Nexus One General] peliROJO:
How can you have over 2600 posts and ask a question like that.
[Nexus One General] djmcnz:
You need to know the character before you can understand the context.

Search for a few of his posts in this thread... :)

Credit for starting with the first page!
[Nexus One General] Maxymo123:
Amrosorma, Paul22000 - what "Task Manager" have you been using that shows the CPU usage? I've downloaded something that's called "Task Manager" but it does not show any ram/cpu info. I've been also using Advanced Task Manager from Arron La and it does not show the CPU usage either.

And another thing. Someone wrote that Watchdog Task Manager allows to control how much the backgroud app uses CPU. But thats not true. There is no possibility to set a CPU threshold for a single app in Watchdog. You can only set the general threshold or put an app to the white list.
[Nexus One General] djmcnz:
It is difficult to find on the Market but it's simple and effective:

Market Name: Task Manager

Market Publisher: houmiak

Market Link: https://market.android.com/details?id=com.houmiak.taskmanager
[Nexus One General] Jack_R1:
Also, System Panel Lite.
[Nexus One General] Maxymo123:
Thank you.

Unfortunately it keeps hanging just after start.

On HTC Desire Z.
[Nexus One General] Thundercum7:
Great info, uninstalled..
[Nexus One General] Maxymo123:
The theory is nice but the practice is different.

When I run my task manager it shows cpu usage of most of the applications as 0%. However after a while an app like com.htc.bgp jumps in with 2% cpu usage. Then the last one goes out with 0% cpu but another app like MS Todo Free jumps in with 1% cpu usage. And so on with application like: Beautiful Widgets, Wifi Widget (which I haven't used from last reboot), MixZing (which I have only installed and do not use at all), Weather and Togle widget (not using and not added on screen), Eray (using sometimes but quited from the app hours ago) - each using from 5% to 1% of CPU.

So it looks not like in your beautiful theory about frozen applications. It looks more like a big boiling pot where any ingredient can come out on the surface at any time just like that. And it keeps boiling and boiling all the time. So if so many unused applications can - from time to time - take some CPU power it means that they eat the battery bit by bit.

What will you say about that?
[Nexus One General] Jack_R1:
That they're not running just for their fun. And yes, if they're active - sometimes they get their share of CPU time for various tasks they perform. Some of them happen to have services - for syncing, listening to various events, etc - that WILL work, even if there is no widget on the screen / nothing done to the app. They won't do anything, but they'll become active and check for tasks to perform from time to time, based on some system events.

And this is why it's said: IF YOU DON'T NEED THE APP - UNINSTALL IT. This WILL save you battery (even if by negligible amount).

On the other hand, killing the apps takes quite a lot of processing - and restarting them will also take quite a lot of processing. And the task WILL restart, especially if it's running a service, and/or if it's running under Sense. So by using a task killer you're actually increasing your battery drain, as already explained something like 100000 times in this thread.

In theory, and in practice, I forgot when I used task killer for last time. And I don't see my phone dying in the middle of the day, either.