Could anyone tell me how to stop intentservice in Android?
If I use stopservice to stop an intentservice, it doesn't work.
I have browsed the website, but nobody has given a clear answer to this question.
Try calling stopSelf() from within the service. The documentation says that some processes may take a long time to complete, so your service is most likely waiting for them to stop. You should probably look into that. Once all requests are complete, the service stops itself.
stopService doesn't help, a process is hogging it up. protected abstract void onHandleIntent (Intent intent) Since: API Level 3 This method is invoked on the worker thread with a request to process. Only one Intent is processed at a time, but the processing happens on a worker thread that runs independently from other application logic. So, if this code takes a long time, it will hold up other requests to the same IntentService, but it will not hold up anything else. When all requests have been handled, the IntentService stops itself, so you should not call stopSelf().According to the documentation Android stops the service after all start requests have been handled, so you never have to call stopSelf().