Notify inactive users (who have not opened the app for 7 days) even if Android app gets killed or runs in background
问题 I have a requirement where I need to notify inactive users (who have not opened the app for 7 days). This means the notification must be sent if the app is in background for 7 days or the app has been killed and not used for 7 days. I followed an algorithm using AlarmManager similar to this answer but the notifications are not sent if the app gets killed. I tried to integrate BroadcastReceiver as shown below but it creates an infinite loop when I call it from OnDestroy() of CheckRecentRun