Pragmatic Android
Task Killers Considered Harmful
Don't use task killers or automatic task managers. Why?
- Android isn't Windows BSF (before SuperFetch)
- Android OS learns (over time) how you use your phone
- Android OS aims to keeps your most used (and most likely to use) apps in memory
- to Android OS spare memory is wasted memory (as it is with most modern operating systems)
- don't kill apps or services you plan on using
- why? killing it uses CPU and battery to start with
- unloading apps from memory uses CPU and battery
- android will then FILL that spare memory with other apps it thinks you will use (which uses CPU and battery)
- then you (or something else) restarts the app you killed
- android has to unload apps from memory to make room for it
- then android puts it in memory
- then you get to use it (and you'll probably just kill it again, right?)
10 run "myapp" 20 kill "myapp" 30 goto 10
Still don't trust me? OK, time to appeal to authority.
- LifeHacker - Android Task Killers Explained - What They Do And Why You Shouldn't Use Them
- Android Developers - Multitasking the Android Way
- LearnYourselfSomeAndroid - Should I Use a Task Killer?
- Honeycomb Designer says "that Advanced Task Killer basically flat out shouldn't exist"
- Discussions on Whirlpool, XNA Developers Forum, GeekFor.Me (paraphrases AndroidDevs)
Just don't use them, ok? And if you really want to, use them for their ability to monitor processes (which already exists @ Settings > Applications > Manage Applications) and not for their ability to auto-kill them - that's Android's job.
NB: Manually killing rogue processes, when you understand what you are doing and why, can be ok, but use ManageApplications
If you insist on using 3rd party task managers, at the very least consider using an app like watchdog lite, and it's "watch your phone's apps, don't kill them" philosophy.
If you use a task killer, please consider the following experiment.
Android Task Management (aka Every Droid has it's Day)
- Uninstall (completely) all your 3rd task managers
- Disable any bundled (thereby uninstallable) task managers
- Use your phone as you normally would; excepting that you:
- only kill apps manually (through the OS); and
- only kill apps which aren't behaving
- Continue this usage behaviour for as many days as you've abused task killers
The Golden Rule : don't stop an app just because it's running
Please consider the experiment, it's worth a shot given how long you'll own the phone right? Ok enough about task killers.
Debugging Batt'ry Like a Boss (aka WTF's w/ root || GTFO culture)
To accurately check battery usage (without 3rd party apps) I present the Vanilla method.
- charge the phone to full charge
- get your phone in the state you want to test (running all the apps etc.)
- unplug the phone
- run it in the state you want to test, for hours (or to near empty, if possible)
- check the Battery Use in About Phone
OR, USE FOLLOWING CODE AT YOUR OWN RISK
<code style="display:none"></code>
Technician Phone Usage Access Code
If you followed the previous steps (sans tech code) you've only had the phone in a single usage state, I've found the values reported thus to be excellent at outing 'bad apps', 'high usage apps' and 'wow my screen sucks juice'. Also consider the following behaviour.
- lock the phone to turn the screen off as often as possible when unplugged (unless ur testing battery life and the tested app only runs when visible, in which case turn brightness down to the lowest, this will make the numbers more accurate, but making the usage scale (0-100%) closer to ur apps actual usage)
It's not a "quick" way of finding out accurate usage, but it works.
I know there's dozens of sites about the place telling you how to improve battery life, and here's my 0.02 bitcents.
Apps Badly Behaving
- regularly check the "running apps" screen
- if there are apps there you haven't launched since reboot, make a serious judgement call as to whether you need that app or not. check all the options for that app, seeing if you can disable features that might be triggering the "run in background"-ness, if you've disabled all features, and the app isn't a "it needs to do this" (i.e. handsent sms and the like) app, uninstall the bastard. It's poorly written to behave like that, so post a comment on their rating to the effect of "stop running background apps unnecessarily" and "one star" it (if you're as mean as me :)
- apps that stay in the notification bar, and stay listed as "ongoing" (I'm looking at you third party media apps) even when they are not actively doing anything, are behaving badly. Give them the honour of a 1 star rating and a comment as to their offense (if they fix it consider fixing your rating), such as "If you're not 'active' don't stay active, biatch, 1 star till fixed, uninstalled"
Battery Sucking Displays
- Lock the screen when you don't need to see it. On my HTC Desire HD it's always the biggest battery whore of the device. Sure it's a big screen (4.3") but even at minimal screen usage and always locking, it nearly always finds itself in the Battery Life Top 5
- don't worry about not using live desktops. Unless you always have them displayed on screen, unlocked, Android is a smart cookie, and well written live wallpapers don't run unless you can see them.
Well Intentioned Apps
- (AFAIK) androids "intents" and the like should make it unnecessary for apps to "launch" with the OS, or constantly stay active
- by this I do NOT mean they just stay resident, that's a good thing, that's Android doing it's "i'm your OS dammit let me manage your memory" thing
Consistent Behaviour
- don't use 5 media players when 2 will suffice
- don't run dozens of 'active' widgets you never look at (these DO actively run in the background, at least most do [BAD apps, BAAAAAD developers]
- the more consistent your usage, the more Android can pre-empt it and optimise both speed and battery usage (both inter-related) for your usage habits
- after you've played around with the dozens of media apps, only leave the ones you use installed. This isn't essential, but it's much simpler than making sure all those other apps behave well (checking all the running services, active services, battery life, etc) and prevents android having to keep them in it's "apps you use" analysis [they'd drop off eventually, but you can give it a hand by removing them completely]
- (HTC Sense) try and stick with one scene & skin per reboot, or reboot once you've found the new one you're going to use. Again, this isn't strictly essential and it will sort itself out over time, but Android will give the apps and widgets active in your last scene as high (if not higher) a priority than the widgets in the scene you switch to... it doesn't kill the widgets that were in the last scene and aren't in the current one (remember, most are written with background update processes, that do run constantly)
Refusing to Quit (Properly)
- some apps, usually without good reason, have a quit button. These apps will remain (the Android definition of) active unless you push quit from within the app, (usually) irrespective of how you exit the app
- this is similar to the "apps written badly" rant, if they stay in the notification "ongoing" and aren't ongoing, uninstall the app and give the dev a piece of your mind
- some apps don't quit when you push "back" and leave the app. This is against Android conventions, so again, give the dev feedback. (And learn how to quit it "it's" way. Or uninstall it, simpler!)
- some apps don't quit when you leave them via the home key (see previous point)
- some apps never quit. uninstall
Uninstall. Please uninstall?
- Manners aren't going to help you here, and I'm not sure why this isn't better documented.
- Some (eg. Widgetsoid, F-Secure Mobile Security) apps don't uninstall when you think they should.
- This is (in my experience) because you've at some point given those apps "administrative" privilages.
- Having these privalges somehow enables them to prevent their own uninstallation (or something along those lines).
- For both the aformentioned apps, go into your settings -> security (or locations, YMMV) and find something like "adminstrators allowed" or something. You'll find your apps listed there. Uncheck them, and then you can uninstall them!
- Huzzah! No more annoying uninstallable background processes, even if they are neato apps, uninstall should "just work" or at least be warned (and NO widgestoid developer I don't think that the last line of your lengthy readme which points uninstall issues to the FAQ is "obvious enough" as how to uninstall you properly).
Charge. Often
- buy chargers, leave them everywhere, and keep a micro USB charger on you. trust me, it's a life saver
- consider buying a second battery, but if you do switch them every so often (as far as I've been able to research these batteries have bad shelf-life if they go unused for long times)
It's Over!
So, that's it! For now. Feedback is warmly welcomed, leave a comment. This is all just from my (limited) experience, but I thought I'd share what I've learnt and (hopefully) learn from you, fellow readers, also. Summoning task killers without introducing new research - however - will most likely inspire fear and loathing. In Las Vegas.
--
Glenn Francis Murray 2011
http://glennfrancismurray.com/pages/pragmatic-tips-for-a-healthier-android
CreativeCommons 3.0 (AU & NonPorted) Attribution ShareAlike NonCommercial
Original posted on /r/android; "Pragmatic Tips for a Happier Android" (15th March, 2011)
Thanks to /r/android and redditors who gave feedback.