IntentService has never been designed to be cancelled, hence the lack of any API to cancel a JobIntentService . Therefore, JobIntenService should only be used for work that don't need to be cancelled. Note that JobIntentService can still be used for work that can fail, and consequently, be aborted.
This class is deprecated. This class has been deprecated in favor of the Android Jetpack WorkManagerlibrary, which makes it easy to schedule deferrable, asynchronous tasks that are expected to run even if the app exits or the device restarts.
You can say JobIntentService is a modern way to run the background service from the background application. JobIntentService. JobIntentService works in the same way as a Service however it enqueues the work into the JobScheduler on compatible Android targets( SDK 26 or more).
How can I cancel a JobIntentService? I see no methods to do so in the docs, apart maybe from the JobSheduler
API and the Context#stopService(...)
method, which I'm unsure if it's the right way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With