I am trying to build an android app to perform a specific task at particular time everyday. So i have tried to implement it in each and every possible way ie. AlarmManager with Broadcast receiver, Job Scheduler and even WorkManager API's. All the 3 mentioned above works well without any problems only if my app is in the recent apps list, if at all i clear the app from recent apps list, it will never work. I even tried to white List the app by ignoring the battery Optimizations, which again did not give any successful results. But one strange things few apps that i download from play store are working fine without this issue. Any suggestions would be helpful.
My device : One plus 7 (Android O)
Another point is that, I need the app to trigger at night when it may not be connected to a network, so gcm is ruled out for me. So is there any offline solutions !?