Auto DND (Do not disturb) mode

GroovyGeek

Senior Member
Oct 11, 2010
895
185
0
Guys who use tasker, care to share your Profile for it?
OK, aftersome messing around I think I have figured out both how to get DnD to work on a schedule, and also how to get all three sound modes (normal, silent, vibrate) out of the OP5

Initial setup: Settings->Alert Slider->Silent: Enable Vibration=OFF
This is essential in order to get all three sound modes with Tasker. The other modes in the Alerts Slider can get set you your liking.

To turn DnD on/off
Code:
Condition: from 10:00PM till 7:00AM (you can change this as well as add days of the week as you need)
Entrance action: Do not disturb=Priority
Exit action: Do not disturb=All
That's pretty much all it takes. You can then control what sounds are played and what are supressed with the settings of the Do Not Disturb alerts slider.

To toggle through sound modes download the Sound Mode Plugin and then define a new task
Code:
If (%SILENT eq off)
 Sound Mode: Configuration=Silent
 Flash "Silent"
Else If (%SILENT eq  on)
 Sound Mode: Configuration=Vibrate
 Flash "Vibrate"
Else
 Sound Mode: Configuration=Normal
 Flash "Normal"
End if
Associate the above task with a widget, give it a pretty icon and add to your home screen. Then every time you touch the icon it will go to the next mode Normal->Silent->Vibrate->Normal. The only thing that does not work at the moment is that in vibrate mode there is no icon in the status bar to tell you that you are in vibrate. You can probably manage that with Tasker too.
 
  • Like
Reactions: blinkin and adrman

my370z

Senior Member
Jan 7, 2017
180
42
0
aldie
OK, aftersome messing around I think I have figured out both how to get DnD to work on a schedule, and also how to get all three sound modes (normal, silent, vibrate) out of the OP5

Initial setup: Settings->Alert Slider->Silent: Enable Vibration=OFF
This is essential in order to get all three sound modes with Tasker. The other modes in the Alerts Slider can get set you your liking.

To turn DnD on/off
Code:
Condition: from 10:00PM till 7:00AM (you can change this as well as add days of the week as you need)
Entrance action: Do not disturb=Priority
Exit action: Do not disturb=All
That's pretty much all it takes. You can then control what sounds are played and what are supressed with the settings of the Do Not Disturb alerts slider.

To toggle through sound modes download the Sound Mode Plugin and then define a new task
Code:
If (%SILENT eq off)
 Sound Mode: Configuration=Silent
 Flash "Silent"
Else If (%SILENT eq  on)
 Sound Mode: Configuration=Vibrate
 Flash "Vibrate"
Else
 Sound Mode: Configuration=Normal
 Flash "Normal"
End if
Associate the above task with a widget, give it a pretty icon and add to your home screen. Then every time you touch the icon it will go to the next mode Normal->Silent->Vibrate->Normal. The only thing that does not work at the moment is that in vibrate mode there is no icon in the status bar to tell you that you are in vibrate. You can probably manage that with Tasker too.
Can you share the xlm file for this? I'm brand new to tasker... couldn't figure out how to do all this yet. Thanks.


Sent from my ONEPLUS A5000 using XDA-Developers Legacy app
 

Vadorequest

New member
Oct 17, 2017
1
1
0
This was one of the most useful feature of OnePlus 3, I wonder why they changed it... Who wants to do this stuff manually? Tasker is not free. llama is not really straight forward.
Damn, I'll miss this!

---------- Post added at 11:00 PM ---------- Previous post was at 10:48 PM ----------

Note that "Automateit" is free and comes with 6 default rules including a silent mode at night.
I just installed it, couldn't test if it's compatible with the usual DnD of OP5, but worth the try.
 
  • Like
Reactions: Noodloid

lordbear

Member
Jul 23, 2011
23
0
0
SF Bay Area, CA USA
I feel that the switch idea was a bad one. And it smacks of copying iPhone design. There are reasons why Android is/should be different in features like this. IMO
My #1 install-first app had been Shush! Basically DND/Silent on a timer. Brilliant for movies, meetings, etc. so you don't forget to come off Silence. But the switch breaks that.
 

blinkin

Senior Member
Mar 1, 2007
728
112
0
Zürich
OK, aftersome messing around I think I have figured out both how to get DnD to work on a schedule, and also how to get all three sound modes (normal, silent, vibrate) out of the OP5

Initial setup: Settings->Alert Slider->Silent: Enable Vibration=OFF
This is essential in order to get all three sound modes with Tasker. The other modes in the Alerts Slider can get set you your liking.

To turn DnD on/off
Code:
Condition: from 10:00PM till 7:00AM (you can change this as well as add days of the week as you need)
Entrance action: Do not disturb=Priority
Exit action: Do not disturb=All
That's pretty much all it takes. You can then control what sounds are played and what are supressed with the settings of the Do Not Disturb alerts slider.

To toggle through sound modes download the Sound Mode Plugin and then define a new task
Code:
If (%SILENT eq off)
 Sound Mode: Configuration=Silent
 Flash "Silent"
Else If (%SILENT eq  on)
 Sound Mode: Configuration=Vibrate
 Flash "Vibrate"
Else
 Sound Mode: Configuration=Normal
 Flash "Normal"
End if
Associate the above task with a widget, give it a pretty icon and add to your home screen. Then every time you touch the icon it will go to the next mode Normal->Silent->Vibrate->Normal. The only thing that does not work at the moment is that in vibrate mode there is no icon in the status bar to tell you that you are in vibrate. You can probably manage that with Tasker too.
Thanks for the tip. I have it setup like this but now when I have the slider in the "silent" mode, my phone won't vibrate outside of the defined scheduled time for the tasker's "do not disturb". Any idea how to fix it?
 
Last edited:

JewbixCube

New member
Feb 2, 2016
4
0
0
Does the Tasker solution require root? Seems like no matter what, my Tasker tasks won't override the current setting. For example, triggering Vibrate:eek:ff or DND:Alarms will -- for a split second -- turn off vibration. I can see the icon change in the notification bar for a split second, then it changes right back to whatever OxygenOS has it set to. Is everyone doing this with root?
 

JewbixCube

New member
Feb 2, 2016
4
0
0
The tasker sound mode plugin does not require root, if you reference to that. It switches modes nicely.
Ok, I'll give that plugin a try. I was using the "Audio" config.

Also I just noticed this is a OnePlus 5 thread. I'm on the 5t. Not sure if that matters. I'm running OxygenOS 4.7.6
 

JewbixCube

New member
Feb 2, 2016
4
0
0
The tasker sound mode plugin does not require root, if you reference to that. It switches modes nicely.
Alright, this still isn't working for me even with Sound Mode Plugin for Tasker. I must be missing something or maybe I have a different OS version.

No matter what I try, when I run the task, nothing changes in terms of Vibrate on/off. It stays at whatever the slider is set too. Here is my Tasker action and here are my OS settings. Racking my brain here.

https://imgur.com/a/Vd1U1
 
Last edited:

JewbixCube

New member
Feb 2, 2016
4
0
0
Alright, this still isn't working for me even with Sound Mode Plugin for Tasker. I must be missing something or maybe I have a different OS version.

No matter what I try, when I run the task, nothing changes in terms of Vibrate on/off. It stays at whatever the slider is set too. Here is my Tasker action and here are my OS settings. Racking my brain here.

https://imgur.com/a/Vd1U1
Alright I got it to work. The slider MUST be in "Normal" position, the bottom one, for any of the Tasker actions to take effect. Not sure if that's what everyone was already doing, or if it's just me who had this problem.
 
Last edited:

jhs39

Senior Member
Oct 8, 2015
2,486
717
0
Chicago
You're really better off flashing a custom ROM that has more respect for Android. Oxygen is the Chinese operating system Hydrogen with Google Play Services installed. Eliminating scheduled DND is one of the ways Oxygen "improved" on Android in ways that make no sense. Another is swiping down to answer phone calls. Another was turning off Doze mode by default in OOS Nougat and hiding a toggle to turn it on in the hidden developer settings.

If you download the Chinese Hydrogen operating system,flash it selecting English as the default language and manually install Google Play Services you won't be able to tell the difference between Oxygen and Hydrogen. Oxygen beginning with Nougat has been 100% programmed in China by the Hydrogen programming team. And since One Plus sells hardly any phones in China they don't attract the most talented software engineers.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone