@CallSuper
  @Override
  public boolean onStopJob(@NonNull JobParameters job) {
    synchronized (runningJobs) {
      AsyncJobTask async = runningJobs.remove(job);
      if (async != null) {
        async.cancel(true);
        return true;
      }
    }

    return false;
  }
SimpleJobService provides a simple way of doing background work in a JobService.

<p>Users should override onRunJob and return one of the {@link JobResult} ints.
jobdispatcher/src/main/java/com/firebase/jobdispatcher/SimpleJobService.java