What I want to create: An offline app that sends a text notification to user from the database (Room) once every 5 days at a random time. I test the app on my real device Redmi Note 7 (MIUI).
So I tried to use Alarm Manager and Work Manager for repeating task but it only worked right (even app is killed) if I enabled autorun and disabled buttery optimization for my application. Then I found out that many manufacturers like Xiaomi, Oppo, Huawei and similar restrict background work for apps.
I have 2 questions:
So, I found out that there is no way to send reliable recurring notifications offline via Alarm Manager or Work Manager on every android device. I use FCM and everything works great