I develop an app that uses AlarmManager to set a bunch alarms (usually around 50) that need to be fired at a certain time during the year. This is the code I\'m using since
Your problem (or nightmare) is the Samsung Smart Manager. This app comes pre-installed with all Samsung phones since 2015 and is supposed to deactivate Apps that are unused. "How does it know which apps are not used?" You may ask - simple:
Every app that has not been launched by the user for 3 days gets deactivated.
All remaining AlarmManager entries - of course - also get deleted. You can read about it on their "Developer Forums". Feel free to follow here or here until these threads get deleted by the staff. I have yet to see someone from Samsung respond to the topic.
The only way to "fix" this is to inform the Users of your app about the situation and show them how to whitelist your app in Smart Manager. We've had to setup a website with step-by-step instructions showing how to do this for our users.
You may think about setting up a background service, or calling AlarmManager every six hours or so - none of these hacks will work.