if i am doing something like 10 * 1000, then this code is working but not with calendar.getTimeInMillis(), i need to generate PN in future based on calendar time and Alam Manger is not looking good (Checked on Android P and its not working ) as per new Android updation on background services.


Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.SECOND, 10); JobInfo info = new 

JobInfo.Builder(1231, componentName).setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY).setOverrideDeadline(calendar.getTimeInMillis()).setMinimumLatency(calendar.getTimeInMillis()).setRequiresCharging(false).setBackoffCriteria(10 * 1000, JobInfo.BACKOFF_POLICY_LINEAR).setExtras(persistableBundle).build();

I am trying to run job scheduler a/c calendar time, but looks like its not working.

0 Answers