I need to do some background work which requires a Context in a JobService (I'm using the Firebase JobDispatcher one because we support api 16+) I've read a lot of articles about the JobService and AsyncTasks but I'm unable to find any good articles on how to combine them if you need a Context.
My JobService
import com.firebase.jobdispatcher.JobParameters;
import com.firebase.jobdispatcher.JobService;
public class AsyncJobService extends JobService {
@Override
public boolean onStartJob(JobParameters job) {
new AsyncWork(this, job).execute();
return true;
}
@Override
public …Run Code Online (Sandbox Code Playgroud)