Dima
Dima

Reputation: 101

WorkManager - PeriodicWorkRequest not working on android api 21

I'm trying to schedule a periodic check with PeriodicWorkRequest. It works great on android API 23 and above, but not on android API 21. On API 21 it works only once.

Here is a sample code PeriodicWorkRequest worker = new PeriodicWorkRequest.Builder(TestWorker.class, MIN_PERIODIC_INTERVAL_MILLIS, TimeUnit.MILLISECONDS).setConstraints(Constraints.NONE).addTag(TAG_PERIODIC_WORK_REQUEST).build(); WorkManager.getInstance().enqueue(worker); Tested with the latest alpha03 and also alpha02 What I'm doing wrong? Or could it be a bug?

Upvotes: 5

Views: 1574

Answers (1)

Rahul
Rahul

Reputation: 21134

Sorry, I just verified that this is a bug on our end. We should have a fix in alpha04. Stay tuned.

Upvotes: 2

Related Questions