Work Manager on Chinese ROMs like Xiaomi and Oppo, when under battery optimization, increase the scheduled delay of work by several hours., however, I have noticed some apps are able to have scheduled jobs run quietly flawlessly even under battery optimization. There is one difference I noticed is that they show a notification every time the job runs, so would that be responsible for keeping the app alive by the battery optimizer?
And I also noticed, that after I force stopped that app, after 24 hours it started working again, but how is that possible? Can anyone shed any light on what is going on behind the scenes, and what method they would be using?
Let me know if there are any more details required.
Xiomi MiUi 11 (chinese version of firmware) Work Manager very badly by default and runs in random order several times and after a few hours it just stops working.Further nothing happens. To solve the problem, I took 2 steps
1. Settings->Battery & perfomance -> App battery saver -> Select you application -> No restrictions
2. Settings -> Apps -> Permissions -> Autostart -> Add your application to autostart
After I added to Autostart
and No restrictions battery
. I rebooted the device and it worked correctly with Work Manager. I think that on Chinese devices that have heavily modified android, it is only possible to manually add launch permissions.
So, turns out the solution to keep the jobs running on time is to enable auto-start and disable battery optimization for the devices. Guiding your users to do so is inconvenient but as of now, this is what can be done!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With