On Tue, Aug 10, 2010 at 5:41 PM, Streets Of Boston <[email protected]>wrote:
> I have no empirical evidence for it, but i did notice that non- > foreground background services were being killed more aggresively. But > i could be mistaken. > It could be more memory. Oh and also there is now a limit on the maximum number of background processes we keep -- it turned out especially once all of the memory on the nexus one was available, for devices with large amounts of RAM we could keep around a fairly ridiculous number of processes. :) Services have for a number of releases been pushed into the background class after running for a while, to eventually get killed and restarted. On devices like the Nexus One this could happen a bit more frequently. However, for the last few releases it has been designed to basically guarantee that a background service will always get killed every now and then. If you are running a service that the user is aware of, you should use Service.startForeground(). One of the things this does is tell the system the user would not be happy if the service's process gets temporarily killed. (Note that as of 2.0 Service.setForeground() is deprecated and has become a no-op.) -- 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

