Services are not designed to live forever. Users detest developers who create such services, in cases where the *user* does not want the service to run forever. Users will attack you with task killers and the Force Stop option in Settings. And so on.
If you believe that the user truly wants a service to run forever -- say, a music player -- use startForeground(). The user will see a Notification and know that your service is running. The Notification should provide a means for the user to shut down your service. Better yet, reorganize your project to avoid the everlasting service in the first place, such as using AlarmManager to get control periodically. On Thu, Dec 8, 2011 at 4:20 PM, Soma <[email protected]> wrote: > Hi, > > Please let me know.. how do we make the service still run even though the > Activity that launched it is killed.. I tried STICK_SERVICE, but of no use.. > I still find the service being killed... > > -- > 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- 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

