Well the thread is doing something at the moment I want him to be killed. (he is downloading pictures which will be shown in the gui later on) So I've looked at your example but don't understand how I should implement that in my thread. I just want him to stop what he is doing because after leaving the activity I dont need that data any more.
Could the problem be that I'm binding in the activity onStart() but using the binded service happens in the started background thread? PS: Thank you for all your help! On 22 Aug., 20:56, "Mark Murphy" <[EMAIL PROTECTED]> wrote: > > After a little bit of debugging I know that the Service runs inside > > the background thread. (the methods that I call inside the service > > after binding to it) > > Right. > > > But after that is it really that difficult to stop that background > > thread in onPause? > > You don't want to "stop" the thread. You want whatever the thread is > blocking on to stop blocking, and for the thread to recognize that it > needs to go away and then quietly die on its own. > > So...what is the thread blocking on, inside the service? Or are you in > some sort of Thread.sleep() loop? > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 1.1 Published! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

