Search in sources :

Example 1 with JobService

use of android.app.job.JobService in project android-priority-jobqueue by yigit.

the class FrameworkScheduler method onFinished.

@Override
public void onFinished(SchedulerConstraint constraint, boolean reschedule) {
    JqLog.d("[FW Scheduler] on finished job %s. reschedule:%s", constraint, reschedule);
    JobService service = this.jobService;
    if (service == null) {
        JqLog.e("[FW Scheduler] scheduler onFinished is called but i don't have a job service");
        return;
    }
    Object data = constraint.getData();
    if (data instanceof JobParameters) {
        JobParameters params = (JobParameters) data;
        service.jobFinished(params, reschedule);
    } else {
        JqLog.e("[FW Scheduler] cannot obtain the job parameters");
    }
}
Also used : JobParameters(android.app.job.JobParameters) JobService(android.app.job.JobService)

Aggregations

JobParameters (android.app.job.JobParameters)1 JobService (android.app.job.JobService)1