@CallSuper
  @Override
  public boolean onStartJob(@NonNull JobParameters job) {
    AsyncJobTask async = new AsyncJobTask(this, job);

    synchronized (runningJobs) {
      runningJobs.put(job, async);
    }

    async.execute();

    return true; // more work to do
  }
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