googlearchive / firebase-jobdispatcher-android

DEPRECATED please see the README.md below for details.
Apache License 2.0
1.79k stars 208 forks source link

How to force stop JobService from Activity #271

Closed ashishkumawat closed 5 years ago

ashishkumawat commented 5 years ago

Not found any solution to stop service from activity like on click of button.

kartubi commented 5 years ago

same here -_-

emailsubjekt commented 5 years ago

I can't imagine these guys have so little idea what they're doing that they decided to not include a stop code anywhere. I mean, ok, you define it when you start it, but what if I wanted to finish it earlier? Not cool bro

toddshansen commented 5 years ago

ptal at these elements: https://developer.android.com/guide/components/services#Lifecycle

and the example here: https://stackoverflow.com/questions/4748964/android-cancel-asynctask-forcefully

Both offer strategies to stop your service if you want.

Closing this as FJD is deprecated and so we won't be adding an additional api for this.