The main idea was to have simple app to turn on/off "Do Not Disturb" mode. I needed mini app accessed from screen widget to easily set quiet mode for important business meetings. For the first use, you'll have to set permissions to toggle "Do Not Disturb" mode and app will open settings screen for you. Just set app permission and click back. From that moment, app will be allowed to toggle quiet/normal mode.
In Android 6.0 (like my Samsung S7), app permission path is on the following location:
Settings -> Lock screen and security -> Other security settings -> Do not disturb permission
And is possible to customize how DnD mode will behave - like without any exceptions (as it's for Alarms). Just open the settings on the following path and set:
Settings -> Do not disturb -> Allow exceptions
主要的想法是有简单的应用程序来开启/关闭“请勿打扰”模式。我需要从屏幕小部件访问能够轻松地为重要的商务会议安静模式迷你应用程序。对于第一次使用,你必须设置权限切换“请勿打扰”模式,应用程序将打开设置屏幕为您服务。只要设置应用程序的权限,然后单击回来。从这一刻起,应用程序将被允许切换静音/正常模式。
在Android的6.0(就像我的三星S7),应用程序的权限路径是在以下位置:
设置 - >锁定屏幕和安全 - >其他安全设置 - >请勿打扰许可
并且可以自定义免打扰方式将如何表现 - 就像没有任何异常(因为它是用于报警)。只要打开以下路径和设置上的设置:
设置 - >请勿打扰 - >允许例外