Call startService() first, and then after that bind to the service as usual.
On Sun, Mar 1, 2009 at 10:46 AM, michael.bollm...@googlemail.com <michael.bollm...@googlemail.com> wrote: > > My service works exactly the way i want as long as i use start and > stop > and communicate using intents. > > However my activity needs to change the state of my service as well as > retrieving > state information. > > So i thought it would be nice to broadcast some kind of state_changed > event from > my service and use a binder interface to pull information from the > service or change > the services state based on user input. > > This works fine too. > The only problem is that my service gets killed when i unbind it just > as the documentation says. > > Is there any way to keep the service alive but still get an interface > to control it directly. > My activity offers the user a way to stop the service and the service > kills itself anyway > after it's work is done but i don't want the service to stop every > time the activity is destroyed. > > Thanks in advance > Michael > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---