[android-developers] Re: ServiceConnectionLeaked warning

2010-01-05 Thread Mike Collins
Well, there is exactly one place where the code binds and exactly one place where it unbinds. The binding is shared between the activities activity 1 does a bind on create and unbind on destroy. Breakpoints and logging indicate that exactly one bind is called and no unbinds are called during the

[android-developers] Re: ServiceConnectionLeaked warning

2010-01-05 Thread Beth
Yep, based on your description it sounds like Activity 1 is already running and bound to the Service when you call it from Activity 2. There's your leak. See if you can put a test in Activity 1 before you bind to the service. If it is already running the service and bound, don't do it again. You

[android-developers] Re: ServiceConnectionLeaked warning

2010-01-05 Thread Pawel Kapala
Hello! It seems you're leaking the service connection in some way. Try doing some logging after you bind and before you unbind to the service, to see if you have unbound where needed (i.e. Activity.onDestroy). I guess, in your case, when you restart the activity 1, without previous unbind, the ser