Search code examples
androidandroid-doze-and-standbyandroid-workmanager

How to detect the maintenance window will be closed event in Doze mode?


I want to start a hard Worker.class, but when phone switching to Doze mode and then maintenance window comes sometimes is not enough time to finish Job and I need an event to close timers and to save databases


Solution

  • You have 10 mins to complete your work. If you need more time, I suggest splitting up your work and scheduling more Workers.