2

I've been facing issues with some chinese ROMs that perform an aggressive policy against background jobs.

When testing with a Xiaomi MI 9 - API 28 - MIUI 10, I've checked that sometimes the doWork method from a registered worker is not called, but other it is. When disabling the optimization options (battery and background app blocking, which come enabled by default) it seems to work more consistently, but I can't be sure if my users will do it or even want to.

The question is, if I've registered a periodic work with 1 day repetition, and one of the days it is blocked (so doWork is not called and, hence, no SUCCESS, ERROR or RETRY result for the pending work is returned), it will be executed the next day regardless this or it will be permanently blocked because "the chain has been broken"?

I mean, does the library enqueue the next work just after the previous work has finished or are they registered in the system as periodic and the result of one of them is not relevant for the execution of the next?

giroxiii
  • 655
  • 5
  • 14

1 Answers1

0

If the work never runs, the next iteration won't run either unless the app is manually opened by the user in the intervening time.

SumirKodes
  • 551
  • 2
  • 6