I will be starting my service to download data from server. I did this using JobIntentService
but my problem is when i closed my activity i need to stop the service on Destroy, using that UNIQUE ID. is there is any other option to cancel the running JobIntentService
?
Asked
Active
Viewed 48 times
0

Vishal G. Gohel
- 1,008
- 1
- 16
- 31

Stack
- 1,164
- 1
- 13
- 26
-
Possible duplicate of [How to cancel a JobIntentService](https://stackoverflow.com/questions/45922178/how-to-cancel-a-jobintentservice) – shkschneider Mar 26 '19 at 10:56
-
JobIntentService is not intended for such use unless you do some hacky workarounds with static variables. Better just use service with binding. – ror Mar 26 '19 at 10:57