> Just a note on Services that is probably important to you. If they do > not belong to the current foreground process, they are given quite a > low priority rating by the OS, so they will be terminated quite soon > if resources get low.
Uh, are you sure about that? "If the service has been started, then its hosting process is considered to be less important than any processes that are currently visible to the user on-screen, but more important than any process not visible. Because only a few processes are generally visible to the user, this means that the service should not be killed except in extreme low memory conditions. " (from http://developer.android.com/reference/android/app/Service.html) Activities that are on the stack, from applications other than the foreground, should be cleared out before any service. > Generally for Services that only exist for a > small task this will rarely come in to effect but for your long > running Services, you are likely going to be effected by this over a > period of time. That's certainly true. There is no such thing as an indefinitely-running Service -- only a temporarily-lucky Service. Having a local Service that supports a set of activities and then closes down is great. Having a Service that is triggered by AlarmManager to do some work and then closes down is great. Having a Service that thinks it will live forever is unrealistic. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---