I recently was updating an app that I work on to handle notifications from push using a JobIntentService
instead of a regular IntentService
because
I ran into this issue trying to enqueue the JobIntentService
using JobScheduler
. While JobScheduler
has its own enqueueWork()
method, it doesn't work with JobIntentService
. The service will start but onHandleWork()
is never called.
It started working again when I used the static enqueueWork()
method that is on the JobIntentService
- eg:
MyJobIntentService.enqueueWork(context, ...)
None of this was obvious from reading Android's javadoc.