Fixed
Status Update
Comments
ra...@google.com <ra...@google.com>
ap...@google.com <ap...@google.com> #2
We introduced a regression in beta02. Can you try using beta01 instead ?
dr...@gmail.com <dr...@gmail.com> #3
Also, beta03 is coming with a fix very soon.
ap...@google.com <ap...@google.com> #4
Thank you for your prompt response. I've checked the functioning of OneTimeWorkRequest in beta01 and it works as expected. Looking forward to beta03 for the fix.
Description
long interval = 900000; // 15 minutes
long flexInterval = (interval / 2);
workRequestBuilder = new PeriodicWorkRequest.Builder(MyWorker.class, interval, TimeUnit.MILLISECONDS, flexInterval, TimeUnit.MILLISECONDS);
When I enqueue this on my Android 7 device, the first periodic work does not fire immediately, but as expected only fires halfway through the interval, when the flex period starts.
But when this is enqueued on an Android 4 device (I'm using an Android 4.3 emulator but I noticed this first on a user's real Android 4.3 device), the first periodic work fires IMMEDIATELY.
Seems like flexInterval is not properly taken into account pre Android 5 (based on AlarmManager)??