I'm just worried about using bindService alone because I need the
service to stay alive between orientation changes of the activity.
There will be a period when the activity unbinds and the new activity
binds but the service can not be stopped then or it will defeat the
whole purpose of using it.

On May 28, 5:39 pm, Mike Hearn <mh.in.engl...@gmail.com> wrote:
> > I'm wondering if I just leave it running, if the OS will eventually
> > kill it because nothing is bound to it and it is inactive.  Can I
> > count on that?
>
> No. If you start a service with startService() it is supposed to quit
> itself, otherwise it will never die. It's best to pick one of bind or
> start and stick with it, unless you are really sure what you are
> doing. Don't worry about the service dying, remember that a service is
> just a lifecycle construct. If you bind() to it in each activity when
> your activities are gone the service will go away too.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to