On Sat, Dec 11, 2010 at 11:38 AM, Rutton <rut...@web.de> wrote:
> I am working on an activity, that is connected to a local service. The
> service gets started fine in the activites onResume and can be
> accessed.
> What I want to do is to unbind the service in the activity's onPause
> method. If I do that, I get an "Service not Registered" exception. And
> if I don't do the unbind, I get a "Leaked Service connection"
> exception.

Make sure you are passing the same ServiceConnection to
unbindService() that you used in bindService().

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2

-- 
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