I have a service that has its own thread running on background. I\'d like to kill that service including the thread.
I created the thread like this and run it.
to kill the thread , i think you can do like this :
myService.getThread().interrupt();
NOTE : the method Thread.stop() is deprecated
Thread.stop()
EDIT : : try this
public void stopThread(){ if(myService.getThread()!=null){ myService.getThread().interrupt(); myService.setThread(null); } }