尝试过AlarmManage和JobScheduler,但是当从后台终止应用程序时不起作用。
您应该使用具有定期功能的最新WorkManager库。
尝试此库。这对我帮助很大https://github.com/evernote/android-job