Status Update
Comments
[Deleted User] <[Deleted User]> #3
I have updated to beta04 and am still experiencing the same issue. I do not think that this issue is a true duplicate of the issue linked above, because this has to do with continuing periodic work that has not been interrupted.
su...@google.com <su...@google.com> #4
Can you please give us a sample app that reproduces this problem?
Description
Version used: beta01, beta02, and beta03
Devices/Android versions reproduced on: Pixel 2 on 9, Nexus 6P on 8.1
Code used to enqueue period work:
WorkManager.getInstance()
.enqueueUniquePeriodicWork("periodic_backup", ExistingPeriodicWorkPolicy.REPLACE,
PeriodicWorkRequest.Builder(BackupWorker::class.java, quantity, timeUnit)
.addTag("contacts_backup")
.build())
When testing I've used a 15 minute interval.
I have additionally tried setting various constraints to see if applying them has any impact on the task resuming after the app is swiped away, including NetworkType.CONNECTED network constraint, and a battery-not-low constraint.
As long as the app is left unswiped the periodic work will continue to run indefinitely. The moment that it is swiped from the window selector the work never resumes, even if left for more than a day. If I check the WorkInfo by searching the "periodic_backup" tag in getWorkInfosForUniqueWork, I can see that it is there, but never leaves the ENQUEUED state.