My bad, stop() is final, so you'll have to find another place to unbind the service.
Cheers, Justin Android Team @ Google On Aug 22, 9:26 am, "Justin (Google Employee)" <[EMAIL PROTECTED]> wrote: > I'm not sure its complaining about the thread shutting down, but > rather that you're trying to unbind a service that is note bound to > "Service not registered". > > Try keep a reference to your thread in the your Activity. in onPause() > your should call Thread.stop(). Override stop() in your thread to > unbind the service and then call super.stop(). > > Cheers, > Justin > Android Team @ Google > > On Aug 22, 8:19 am, code_android_festival_way > > <[EMAIL PROTECTED]> wrote: > > Hello guys! > > > I'm having the following problem. I'm having an activity that starts a > > background thread in order to bind to a service which does some work. > > Now I've got the problem that when pressing the back button I get the > > following exception: > > > 08-22 17:09:46.460: ERROR/AndroidRuntime(26218): Uncaught handler: > > thread Thread-8 exiting due to uncaught exception > > 08-22 17:09:46.460: ERROR/AndroidRuntime(26218): > > java.lang.IllegalArgumentException: Service not > > registered: [EMAIL PROTECTED] > > > I've done the following in the onPause() method: > > > this.unbindService(svcConn); > > background.interrupt(); > > background = null; > > > I don't really know how to stop that thread properly when leaving the > > activity. Any help would be appreciated! > > > Regards! --~--~---------~--~----~------------~-------~--~----~ 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] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

