Do not ask for QUERY_ALL_PACKAGES permission (Google restriction)
The issue...
Some versions of Android still play audible notifications when "Do Not Disturb" mode (also called "Night Mode") is selected, which can be very annoying.
The solution to this problem is not easy, and should be implemented by the OEMs itself, but while that solution arrives (we trust it), we have found an alternative solution that mitigates the problem: detect when a notification arrives and deactivate the device sound while it plays.
Well, it really isn't that simple...
Apps, not even those that implement notification subsystem management operations, can't modify notifications from other apps.
What we can do is detect the notification and silence the phone while it lasts.
But there is another added problem: In the latest versions of Android with the inclusion of notification channels, notification management apps are prevented from knowning the sound that a notification is using.
Our solution...
The solution we propose, which (partially) solves the problem, is to propose that you select which applications you want to mute when the device is in "do not disturb mode" and, for each of those applications, indicate the notification sound they use, which It will allow us to calculate the approximate time that we have to silence the device to prevent the notification from being heard.
Please, report bugs or request features by email or at XDA thread: https://forum.xda-developers.com/android/apps-games/app-silent-notifications-t4128113