Add background restriction check on every start as it could be silently re-enabled by android

Feature request: add background restriction check on every start

The story

Android could disable permissions for rare used apps. If this is not explicitly prevented by user, once you could oversleep with a message like this:

:alarm_clock: Sleep • 2h
App is blocked from running in background
We tried to wake you up, but Sleep as Android was background restricted. We may not have been able to start the alarm. Please ensure that the app is not background restricted for alarms to work properly. See dontkillmyapp.com

The main problem is this message suddenly appears instead of the alarm at the worst time possible.
With its CAPTCHA feature, Sleep as Android is the best app to ensure you will definitely wake up. So, if you use the app only the time it is vital for you to definitely wake up, one day it may fail (that’s my today case :sob:)
That’s not a device problem. I definitely allowed background activity, and it undoubtedly worked before today. Probably, the reason is I didn’t uncheck the “remove permissions if app isn’t used” feature and haven’t used the app for some time.

Workaround

It should be possible to implement background restriction check at every start, at least the most simple one. With this feature, the user will know about the issue before it’s too late to do anything, at least in case of auto-disabled android permission.
If it’s impossible to detect the restriction at the time the app is launched, it should be possible to check whether it is running after 30s - 1m - 5m and send a notification if it fails.
Also, it would be great to add an advice “leave the app in the foreground in the most vital cases” to the tips.

PS: many thanks to the developers. Sleep as Android has saved me many times up to this day.
PPS: I really don’t want anyone to fail like me :sob: