On Tue, Nov 17, 2009 at 4:55 PM, todd <[email protected]> wrote: > In > our case our bg service only watches a particular directory waiting > for new files to be added. It's not *running*, it's waiting. Users go > off and kill our app then wonder why it doesn't work any more. >
Are you saying you have a Service always running in the background? If so, then you are in fact taking significant resources that impacts the user experience. The main limitation on the device is not CPU (especially as of 1.6 we ensure that background stuff can't disrupt more important stuff), but memory. Having a service sitting there running consumes multiple megabytes of memory, and on most existing devices there is only enough memory to have a handful of such things running at a time. So this is the kind of thing that, indeed, a user may want to kill because the app is using resources that they want available for other things. As of 2.0 there is a UI for them to see these running things and make them stop if they want, so there is no more need for task killers to do this kind of thing, which are also very misleading about what is actually going on and what should be done to get resources back. You can find the Running Services UI in 2.0 under Settings -> Applications -> Running Services. Definitely take a look at this to make sure your app isn't leaving things running when it doesn't mean to! (Btw, the information at the bottom is pretty obscure so here is the explanation: the first number is the amount of free/cached RAM in the system; the second is the amount of RAM used by background processes that the system can freely kill for more memory and "in N" is the number of such processes; the number on the right is the amount of RAM being used by required/foreground processes and the "in N" is the number of such processes. The list itself shows you every running service (with the icons next to them) and the gray divider bar(s) above are the process(es) being kept around by those services showing the amount of memory being used by them.) -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

