Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set value for flexMillis in Android. #10

Open
jeberhardt opened this issue Oct 9, 2020 · 1 comment
Open

Unable to set value for flexMillis in Android. #10

jeberhardt opened this issue Oct 9, 2020 · 1 comment

Comments

@jeberhardt
Copy link

On Android API level 24+, there is a property in the JobInfo object called flexMillis. This affects when a periodic task will be executed from the interval time.

Currently, BGTask calls setPeriodic with the same values for intervalMillis and flexMillis:

builder.setPeriodic(interval, interval);

This means, if I want a really long interval period, like 4 hours, then the flex window will also be 4 hours, meaning the job will run anywhere between 4-8 hours. The longer the interval, the longer the flex window.

It would be great if the flexMillis value could be passed with the config to prevent an inadvertently longer flex window.

@christocracy
Copy link
Member

christocracy commented Oct 9, 2020

Shouldn’t be a big deal. I have an update I’ve been meaning to push out soon with task-timeout callback, I’ll look into putting it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants