DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Page 3 of 27 FirstFirst 1 2 3 4 5 13 ... LastLast
Results 21 to 30 of 270
Like Tree3Likes

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

  1. Senior Droid
    andjarnic's Avatar
    Member #
    1311
    Join Date
    Nov 2009
    Location
    Sacramento area, CA
    Posts
    239
    Phone
    Moto Droid
    #21
    @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.
  2. Junior Droid
    Chigga311's Avatar
    Member #
    1612
    Join Date
    Nov 2009
    Posts
    22
    Phone
    Motorola Droid
    #22
    Andjarnic -

    That was very technical but understandable.
    I know NOTHING about computers and I got the jist of your explination.

    Thanks
  3. Senior Droid
    andjarnic's Avatar
    Member #
    1311
    Join Date
    Nov 2009
    Location
    Sacramento area, CA
    Posts
    239
    Phone
    Moto Droid
    #23
    Hey.. glad it helped and especially glad that if you know nothing about computers and yet you still understood it. Maybe my geek to english is getting better.
  4. Senior Droid
    ThePhoneGuy's Avatar
    Member #
    1361
    Join Date
    Nov 2009
    Location
    NYC
    Posts
    121
    Phone
    The DROID
    #24
    I have 15 apps running right now in the background according to APP KILLER, I haven't touch or killed any of the apps except for the APP KILLER itself, i killed APP KILLER only, and left the other apps to play themselves out.

    With about 10 text messages and three calls, a few internet surfs, and a 2 minute timer on the face screen... i still have a pretty strong battery left, just the tip of the battery has darken since 9AM.
  5. Administrator
    cereal killer's Avatar
    Member #
    88
    Join Date
    Oct 2009
    Location
    Austin
    Posts
    10,799
    Liked
    1226 times
    Phone
    Nokia Lumia 928
    Premium Member
    #25
    Thanks for clarifying it so well for everyone andjarnic...

    This should be stickied because this subject is always brought up and there is a lot of misinformation out there about.

    Again thanks for clarifying that.....good stuff : )
  6. Senior Droid
    andjarnic's Avatar
    Member #
    1311
    Join Date
    Nov 2009
    Location
    Sacramento area, CA
    Posts
    239
    Phone
    Moto Droid
    #26
    I think it is stickied..I see it at the top of the forum list.
  7. Master Droid
    medicTHREE's Avatar
    Member #
    516
    Join Date
    Nov 2009
    Posts
    463
    Liked
    1 times
    #27
    While technically true, how is it that these running processes eat 70 mb of memory in a mere hour.
  8. Administrator
    cereal killer's Avatar
    Member #
    88
    Join Date
    Oct 2009
    Location
    Austin
    Posts
    10,799
    Liked
    1226 times
    Phone
    Nokia Lumia 928
    Premium Member
    #28
    Quote Originally Posted by andjarnic View Post
    I think it is stickied..I see it at the top of the forum list.
    thats because we are posting in the thread and it brings it to the top : )

    If stickied it would say "Stickied" then the title
  9. Premium Member
    mth04's Avatar
    Member #
    133
    Join Date
    Oct 2009
    Posts
    4,098
    Liked
    5 times
    Premium Member
    #29
    Quote Originally Posted by cereal killer View Post
    Quote Originally Posted by andjarnic View Post
    I think it is stickied..I see it at the top of the forum list.
    thats because we are posting in the thread and it brings it to the top : )

    If stickied it would say "Stickied" then the title

    I stickied it for now. Good info. here. While the devices are very new from VZW I thought this was a good topic to bring out to people . Thanks again for the great information
    Sometimes , It is what it is !
  10. Senior Droid
    ThePhoneGuy's Avatar
    Member #
    1361
    Join Date
    Nov 2009
    Location
    NYC
    Posts
    121
    Phone
    The DROID
    #30
    Quote Originally Posted by ThePhoneGuy View Post
    I have 15 apps running right now in the background according to APP KILLER, I haven't touch or killed any of the apps except for the APP KILLER itself, i killed APP KILLER only, and left the other apps to play themselves out.

    With about 10 text messages and three calls, a few internet surfs, and a 2 minute timer on the face screen... i still have a pretty strong battery left, just the tip of the battery has darken since 9AM.
    I still have 15 apps running, its 5pm, my phone has been idle since my above post, no calls, no texts, the battery icon still only has the tip part darken.
Page 3 of 27 FirstFirst 1 2 3 4 5 13 ... LastLast

Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. Tethering up and running on droid
    By thericksonebay in forum Droid Hacks
    Replies: 178
    Last Post: 01-16-2011, 09:04 AM
  2. corporate calendar always running
    By aka_rob in forum Android General Discussions
    Replies: 22
    Last Post: 09-01-2010, 10:09 AM
  3. Apps keep running in background
    By w0lfinator in forum Android General Discussions
    Replies: 20
    Last Post: 08-01-2010, 04:04 PM
  4. Please Read this and give me your opinion. It Can't be, Can it?
    By moparharn in forum Android General Discussions
    Replies: 5
    Last Post: 11-09-2009, 05:06 PM
  5. Exchange Email notifications on read
    By jwcooper in forum Android General Discussions
    Replies: 0
    Last Post: 11-09-2009, 01:40 PM

Search tags for this page

android apps running in background

,
apps running in background
,
do android apps run in the background
,

do not worry about apps running in the background

,

droid apps running in background

,

droid running apps

,
how to keep apps from running on android
,

how to keep apps from running on droid

,

keep apps from running on droid

,
why do android apps keep running
,
why do apps run in background
,
why do apps run in background android
,
why do apps run in background droid
,
why do apps run in the background
,
why do apps run on droid
Click on a term to search our site for related topics.
Find us on Google+