Hi I have implemented Android JobScheduler API which was working fine till recently but since 2/3 days there seems to be a inconsistent behaviour in jobs which are scheduled.
Here is the jobinfo builder config :
jobInfo = new JobInfo.Builder(118, new ComponentName(this, LocationJob.class))
.setBackoffCriteria(30000, JobInfo.BACKOFF_POLICY_EXPONENTIAL)
.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY)
.setExtras(persistableBundle).build();
jobScheduler.schedule(jobInfo);
Basic working is when i trigger this it used to start the Job Service class immediately but it ain't starting immediately now.
My JobService class :
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public class LocationJob extends JobService {
private static final String LOG_TAG = LocationJob.class.getSimpleName();
@Override
public boolean onStartJob(final JobParameters params) {
try {
/* doing some server work in another thread. */
} catch (Exception e) {
Log.v(LOG_TAG, e.toString() + " " + e.getMessage() + " " + e
.getCause());
}
return true;
}
@Override
public boolean onStopJob(JobParameters params) {
return false;
}
}
My JobService is not triggering immediately what sort of behaviour is this?