I wanted to try to alleviate some issues that I think many of us are having with the battery dying so fast. Make it a sticky.. or redo the thread with a better name perhaps, but I've seen this posted several times in this forum, and I too have been having random battery drains.
As some threads have noted, and I stated a few times, I feel the single biggest turnoff to this phone for non-techie people is partly what leads to this thread.. the understanding (or lack thereof) of why your battery may drain faster at times. This all leads back to two main issues that I've been coming across. The first is understanding that in fact the Droid, and all Android phones are unlike any other phone out there, including the iPhone, because of one big difference.. ability to run mulitple applications at once.. but to escalate this one step further, the ability to run "services" in the background. The ability to run more than one app is slightly misconeived. You can start more than one application at a time, but at any given moment, only the top most application is running. While that top most application, the VISIBLE app, is running, the other apps you started are paused. This is the MAIN difference between android phones and computers.. computers will "split" the cpu time between all the apps running, whether they are foreground (the one you have the cursore currently clicking on things in), or other background apps, services (OS level tasks), etc. The android platform allows only one application in the foreground to run while all other apps are paused. They do not get "juggled" by the cpu, they remain paused until you actually switch to them. Once you can visually see an application, it is the ONLY foreground application running. BUT.. do NOT get confused with the fact that android phones CAN and WILL run background services at the SAME TIME. A service is an application without an interface, so it never gets paused or brought to the top. You can't switch to it, it always runs. It may only wake up once an hour to do something, or it may continually contact a web server to poll for updates.
So this brings up the 2nd issue. The way applications are written. I have been seeing more and more applications that do NOT stop when you hit the Home button, Back button, or hold the Home button down and switch to a different app. It may be paused at this point, but it could be running still (I'll explain in a sec). I downloaded a pretty neat tower defense game, Retro Defense Lite. Fun little game. But there is NO option to quit. I've tried menu, back, home, etc.. I have no way of stopping this application. This is my 2nd point.. many applications you find on the market are in my opinion either ports of iPhone games or written by developers that don't quite get how the application will run on the Android. This especially goes for applications that provide both a user interface (front end) and run a service as well. And this is what I meant by above when I said I'll explain later. Many applications will need a way to stay active after you've set some settings. An alarm clock app, like the one that comes with Droid, provides a simple user interface to allow you to set alarms, choose the ringtone, etc. But then it goes away. You can kill it with the Advanced Task Killer, etc. What you are stopping/killing tho is the user interface portion of the application. There is ALSO a service still running that periodically does something that will require a teeny bit of energy from the battery to do. The Alarm Clock is an example. There are many other apps that you may install that may be written in such a way as to continue to drain power more often than you may realize to check on some status, update something (a server over your 3G/wifi network for example), or so forth. Incidentally, the reference to them being ports of iPhone games.. there is a reason for saying that. iPhone allows only one app to run at a time. While they do allow the phone "app" AND another app to run simultaneously, you can not run two 3rd party apps at the same time. The only way to switch to another app is to hit the home button then click another icon to start another app. This always results in the app starting up. So, my point in saying this is that developers who write apps for iPhone, then port to Android may often forget that Android can run mulitple apps and don't put in the proper steps to allow the app to be shut down. On iPhone, it's always shut down for them when the user "switches" to another app. On Android, it's simply paused and *might* get shut down by Android (see the sticky on concern over memory) if it needs to.
So many people have sadly resorted to installing a task killer app to kill apps. Original posts were those that were afraid they were running out of memory. There is a sticky on why this is not a concern. However, I actually DO run task killer to save battery power.. by forcefully shutting down apps that don't give me the option to shut them down. In my opinion as a developer-to-be of Android apps/games, I fear this may be one of the few things that might cause harm in the growth of the store and Android as a whole. I don't know for sure, but I can see a LOT of non-tech people eager to get this neat phone and not have a clue as to what I just wrote and if they do somewhat get it, they are going to call the CEO of Verizon and demand a refund. Ok..that's a bit contrived.. the point is, until developers start writing really good quality software that is well tested and can provide ways to be shut down naturally and properly dispose of running services if need be, I fear the issue of battery drain may keep cropping up. Imagine your non-tech mom or dad (or anyone) calling Verizon and the verizon person explaining them what I've just written in simpler terms even.. "oh.. you're probably running a couple of applications that didn't shut down.. or an app with a background service that isn't stopped and it's using battery power while you have the phone off to keep on running". WTF??!! I don't envy the tech/CS people of Verizon and other carriers right now.
Today, my phone died in about 3 hours, I played a game for 1/2 hour on it, then just hit the power button to turn it off. I did not shut the game down. I came back and even tho the game was paused, check this.. the game loop that runs probably 20 to 30 times a second was most likely still running. I do not know for sure.. I am still experimenting with app development at this point, but I do know that games usually have a game loop that tries to redraw the screen 20 to 30 times a second to stay smooth. If the game itself is paused, the game loop is usually still running, just waiting for that key to unpause the game. What I am not 100% clear of is.. if I am playing the game, pause it, then hit the power button to turn off (or sleep) my phone.. if that last app I had open is STILL running even tho I've turned the phone off (and by off.. I mean just pressed the power button to make the screen go dark.. the phone is still on.. I didn't power it down).
If I am way off on this, please do tell. I think I am pretty spot on with how Android works with background services, a foreground app, and potential battery drain, but I am indeed still learning android development. From the few things I've found on the net, understanding how it works for the most part, it seems to me that what I've said above may be partially correct to completely correct. If I am spot on, I sure hope the Android team figures out some better way of making sure apps are completely shut down OR some how figure out some really easy to understand way of explaining to not-so-tech savvy people how things work so that they understand they need to shut some apps down and don't freak out and all run to iPhone.