I'm using Evernote's Android Job library to schedule job to run when device is online with the following code:
new JobRequest.Builder(DemoSyncJob.TAG)
.setExecutionWindow(1L, SECONDS.toMillis(10))
.setRequiredNetworkType(CONNECTED)
.setRequirementsEnforced(true)
.build()
.schedule();
As I can observe, scheduler is waiting for the network and - when device comes online - runs the job, even if time specified as the end of execution window (in my case SECONDS.toMillis(10)
) have passed. So my question is - is this parameter (endInMs
in setExecutionWindow
method) completely ignored when setRequirementsEnforced(true)
is called?