What's new
DroidForums.net | Android Forum & News

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

PLEASE READ: Do NOT worry about Apps running in the Background

Status
Not open for further replies.
I do find that there is a place for application "killers". Even though apps should be "well written" most are not. Memory leaks are all to common and an application "killer" or task manager is often times to best way to remedy the problem.

While that's certainly possible, it's WAY less likely in Android. The main reason for memory leaks is that your application is managing dynamic memory, and making mistakes. In Java/Dalvik, this is managed by the language environment. So at least one big source of problems is eliminated. As an old-time LISP hacker, I can appreciate this :icon_ devil:

Also, there are times where you might want all your memory available, say perhaps for a game or memory intensive app like a mapping program. In these cases a task killer can be very useful to clear out apps that do not need to be running.

If the OS can't eliminate unnecessary memory use, that's a flaw in the OS. I'm not sure about all the services.. there sure seem to be services that have no reason to exist. If Android can't kill these, based on some reasonable pruning strategy when resource demands dictate it, then I agree.. you want a task manager. If it can, then no.. the only significant value in the task manager is for dealing with poorly behaved apps.

It would be a Very Good Thing if reviews of apps dealt with any misbehavior. Better still if Google (or the community) produced some automatic way of analyzing the behavior of apps this way. Back when I was using the Amiga computer, such tools evolved to deal with the lack of hardware memory protection.

Using a developer's tool and a machine with MMU support, it was pretty easy to tell if any given program had memory violations... "Enforcer" hits, after the name of the MMU tool. Somehow, this program was put in the hand of every reviewer of Amiga software. Before too long, it was unlikely any commercial or even freeware program would go out with easy-to-find Enforcer hits. Something like this on Android would probably eliminate, and at the least tag, any programs that are evil on power beyond what you'd expect.

Maybe I have been damaged from all my days with Windows Mobile and Microsoft's insistence that the OS would handle closing apps when needed.

It's easy to get jaded, but I would never use Microsoft as an example of what might or might not be done correctly. I mean, 14 years after the Amiga shipped, MS still can't do hardware auto-config correctly. Even Linux is more advanced now, and that's the OS/tradition that once found it prefectly acceptable to compile the driver in as part of the kernel.
 
why cant i throw it out....??...is there some special way that ATK needs to be deleted..??...i tried grabbing the app and putting it in the trash..but it wont die...any help is much appreciated....
 
@Dream... background processes in the linux OS use almost no cpu or memory usually. As I am writing android apps on Ubuntu Linux, I am looking at the list of tasks running in the background, there are quite a few, and all barely use any memory or cpu. They will be task switched just like any app you run.

@Getaphixx -

1. Apps could possibly use battery life... (Why would I want to let that happen?)

Keep in mind Android phones can run mulitple apps at once. Because of this it is paramount that app developers use all possibilities to properly shut down their apps. One thing you have to remember, unlike any other phone you have used including iPhone, clicking on back, home, etc is NOT going to shut down the app. If you need to go back to the home screen, that app is still running most likely. There are ways a developer can "listen" for when a user does this and shut down their app to mimic how iPhone does it, for example. I am guessing most app developers don't do that tho. I've seen many apps with EXIT/QUIT options, and many without. This is sadly one of the few things I fear non-techie users are not going to understand or realize, especially coming over from iPhone. The home/back button doesn't exit an app if the developer doesn't program it that way. As you are seeing, many apps remain running. HOWEVER, what you should know is.. most apps are sort of suspended when this happens. While you can run multiple apps in the background, only services run continually in the background. All apps, while you can run several, only the FOREGROUND app is actually consuming resources, including cpu cycles and memory. What happens when you switch apps that are not services (services you can't see anyway as they do not have an user interface), they have several signals (hooks, intents, etc) sent to them to allow a developer to save the state of the application, release any resources not needed like DB connections, network, etc, so that while it is suspended, those resources are given back to Android for another app that becomes the foreground app, to use. However, this is both the greatest and worse feature of such an open system as Android. Because Java is the largest language choice right now and Android 2.0 is out, and more phones are coming, and tablets, etc.. you are going to see a plethora of java developers jump on this bandwagon. You are going to see a huge amount of apps hit the store. And you are going to find a LOT of those apps are inexperienced developers trying to mimic the iFart sensation to make millions and retire in 6 months, yet will completely ignore many of the requirements to be a good citizen in the android app world. So, many apps are NOT going to properly release resources, they wont save state, etc. So you will find more and more apps that are going to eat up memory and thus when you kill it using ATK, you'll see resources released and more memory for you to use.

Here is the thing to know tho.. Android is in control. Period. Android WILL KILL AN APPLICATION FOR YOU! :) In other words, if you start running out of memory, Android will send some signals to the app saying "Yo.. I really really need to use some of those resources you got tied up.. so I am shutting you down, completely. Here's your last chance to save any state..." and boom! Gone. Android thus will indeed handle memory as needed on the fly for you. Now.. what happens when you switch back to that app you left running but Android shut down? Well, it starts up again. If the app was built correctly, it will receive a bundle of info pertaining to state info that it should have saved when Android killed it. If done right, it will resume as if nothing happened. You will see a slightly longer delay than if it was still running, as it is now starting up a JVM again to run the app in, and the app may have to reload some state, screens, tiles, graphics, sounds, etc.


3. I don't use my phone for 45min.. And previously used App Killer to disable multiple items.. I come back.. I have things like Alarm Clock and others that have NO business being opened much less running... I kill them.. Jump from 65 to 104mb of memory..

This one does iritate me too.. I am not sure what controls alarm clock coming back to life. I suspect it is a SERVICE app with an interface tho. Service apps can run in the background.. so most likely the Alarm Clock app installed a service as well..that DOES run even when you shut down the alarm clock app. Every so often that service executes in the background and realizes alarm clock isn't running but it needs to, as the alarm clock app is the one that will make use of your ring tones that you selected in the alarm clock app to wake you up with, etc. That is my guess. I am not completely sure tho how this is done yet. I have only begun developing and got a lot to learn yet.


4. Please tell me how killing UNEEDED items is a waste...lol

It is indeed a waste. I am telling you now as a developer, albeit a new one, but one who has been doing java for over a decade and understands the basics of how all this works. Android WILL shut down apps (as I explained above in detail) when it needs to in order to reclaim resources so that the top app (foreground) might have resources to do something with. Even if the foreground app doesn't need them, Android will kill apps if need be as necessary. As I said above, even tho it actually shuts the app down, it goes thru steps to allow an app to cleanly shut down AND recover from the shutdown as if it was never shut down. The app developer just has to write the code correctly to handle this situation.

So, essentially, killing apps becuase you are afraid you are running out of memory is not needed. There is ONE possibility tho.. an app could run out of memory itself! It could load a very large dataset into memory and not have enough. I haven't found/read anything about how Android itself handles swapping memory to disk.. as I don't think you can set up swap memory to the SD card. It would be VERY nice if you could do this, it would allow more robust apps to at least use more memory than 128MB or 256MB the phone comes with. It would also see minor bumps in performance when it was time to swap some memory to the SD card to free up memory, or bring it back in. Windows, Linux, OSX, they all do this for you. I suspect the underlying linux OS handles this, but not quite sure if it does so or not.

Hope this wasn't too technical and helps some of you understand the killing app stuff in more detail.


Wow! Very informative and truly appreciated.
 
to some extent this is true but as ThePhoneGuy noted programs like Wifi, GPS, and maps will shorten your battery life, especially in situations where a lot of CPU time is being used repeatedly trying to connect to a network. I've found that most days my battery will make it 10 to 12 hours and maybe more if I'm not playing a bunch of youtube videos or playing music which I've been doing a lot of lately because I've been spending a lot of time showing off my phone to some coworkers.

But when I'm locked in my server room where I get absolutely no signal from Verizon or any other network, battery life is closer to 7 or 8 hours because the phone spends all the time that I'm in that location trying to reconnect to their network,or any network for that matter.
 
Well 24 hrs without using atk and yes I understand the not needing as well as the needing a task killer, just posting my results for a day
uninstalled last night about this time and since then I have used the phone as much the same as day before, result is after heavy use, changing wallpaer maps appstore internet etc I did have the phone reset 3 times today last one just before posting this. after i noticed it slow down... so my opinion at this time is maybe they are not needed for some users but others that maybe mess with the phone repeatedly it will help out by closing apps out.
I also was checking avail mem in running services and all day had no more than 23-28mb
with using atk I have 55-70 free at any given time,
I am using advance task killer free, no auto close settings, no taskbar icon and just ignore reg apps like mail, messaging, gmail
So I will just use it to close things after I power use the device and see what happens
 
I downloaded a Euchre game yesterday and was playing with it, then went to the home screen and put away my Droid for a bit. When I came back, I decided to check my battery usage. Euchre was just under the display in battery usage. It was still running and sucking away power in the "foreground". I killed the app and all was well.

Sorry people, you can say whatever you want, but a task killer is still useful. Any operating system that does not mandate a way to close applications (not counting services) is a bad design.

(Yes, this particular Euchre game did have an exit button, but after reading this thread, one would think it wasn't needed) :r_c:
 
yesterday I was surfing the web (droidforums mobile version of course) and when I clicked on a link the web browser froze while loading. I mean the loading icon was still up and the little circle in the upper right was still moving but after hitting stop and going back to the main home sreen and clicking browser again it was still stuck loading the page. Nothing I could do would stop it. I downloaded atk in the meantime and used it to kill the browser and that worked. plus my phone was laggy with all the programs sucking up memory. I don't care what anyone says, my own experience with my phone is what matters. ATK is staying on my phone.
 
I'm using it as well, when programs are running in the background and are sucking more battery than when I have them closed, it's a no-brainer.
 
Thanks CK. It is nice to not have to micro manage. What a waste of time...thanks droid!
 
Its obvious that some ppl aren't reading andjarnic's post on page three.

I personally have 15 apps running in ATK and notice no hit on performance. Maybe i have a better droid than everyone else, but i doubt it. What's a more likely explanation is that all the apps I'm running are well written and aren't causing any problems and so the droid is operating like it's supposed to. I also keep GPS/wifi/BT on at all times, although its almost always at 100% charge when i leave the house and it charges in my car.

Some ppl may say well i installed "X" application and it caused problems, therefore this is proof that ATK is needed. True, i keep it around to easily close renagade programs. I don't however ever open it to constantly close programs, like i used to in windows mobile.

As andjarnic explained more elegantly than i can, it doesn't matter if the droid has 1 mb of free memory or 100, it will allocate the memory it needs to run what you ask it to. Also having those programs in the paused state is not gonna kill your battery. They aren't doing anything and therefore aren't using the processor. Its a different story if you have pandora in the background constantly streaming music, or if you had some sort of @home folding program which was "doing something" in the background than yes that will eat up your battery.

Of course if you want to kill those apps go ahead, it certainly can't hurt. But i don't think its gospel that you have to.
 
I completely agree with the idea that the OS allocates memory for what it needs and will call on "paused" memory for a running application if it needs to do so. ATK did not make a significant performance increase with my DROID.

However.. it has been very useful to me for another reason. Coming from a BB and being an avid Windows user who hardly ever reboots, I really don't want to ever have to pull another battery to reset my phone. With that being said I use two Apps that have remote access to my PC.... GmoteServer (for audio and video control of your PC files via your phone) and EStrong File Explorer which allows access to shared PC files and options to transfer files to and from device to PC (cut, paste, copy, move, new, etc). Occasionally with EStrong File Explorer I am unable to connect to my PC server set up with the app. Re entering password, refreshing list, nothing allows it to connect. However, when I use ATK and kill the EStrong process running (I know there is a more involved way to kill apps via Settings but ATK 1 touch kill is easier) I am then able to connect to my PC with the app when I reopen EStrong. Since the Android OS doesn't really ever "CLOSE" an app it makes sense that 'killing' the app would be like a refresh for that app.

Just something I've noticed and it's made my usage a lil easier... so I have reinstalled ATK and left it for now.

Edit: Uninstalled again... notifications not getting through... sure enough everything works great once I got rid of it. No performance difference or battery difference. Issue is dead with me. No more OCD.

Take a bite from Susan Powder "STOP THE INSANITY!"
 
Last edited:
Status
Not open for further replies.
Back
Top