问题
I have tried stack overflow but people only added Android documentation which says it'll work but it doesn't i have also raised an issue in google's issue tracker here.
I have tested on Android versions: 6, 7, 8 and work manager 1.0.0-alpha11, 1.0.0-alpha12
If anyone has found any solution for running periodic job please comment it'll be a great help. Thanks
回答1:
This is a known issue and, as commented in this other bug on Google's issuetracker, there's not much that WorkManager can do in these cases.
As commented in this bug:
...if a device manufacturer has decided to modify stock Android to force-stop the app, WorkManager will stop working (as will JobScheduler, alarms, broadcast receivers, etc.). There is no way to work around this. Some device manufacturers do this, unfortunately, so in those cases WorkManager will stop working until the next time the app is launched.
来源:https://stackoverflow.com/questions/53721111/work-manager-periodic-job-not-working-on-chinese-roms-once-app-is-force-closed