Auto DND (Do not disturb) mode

C3C076

Recognized Contributor
Dec 15, 2012
7,699
24,334
263
Bratislava
ceco.sk.eu.org
Check this https://forums.oneplus.net/threads/do-not-disturb-automatic-rules.546381
But chances are minimal.... Their alert slider implementation changed native DnD in many ways so any changes in this respect would generate them a lot of work, testing, etc, etc and I have a feeling they can't afford it.
There is even a design flaw that can potentially affect 3rd party apps that contain logic based on current interruption filter set.
My bug report here: https://forums.oneplus.net/threads/alert-slider-implementation-affects-android-public-api.555216/
 

C3C076

Recognized Contributor
Dec 15, 2012
7,699
24,334
263
Bratislava
ceco.sk.eu.org
Nice, but unfortunately it is not enough. It won't work at least on official OOS 4.1.6 as auto-DnD has been disabled at framework level by removing
config_system_condition_providers
Even if you modify framework-res.apk is is still not enough due to another changes that broke default DnD zen mode settings values.
This results in another bug I reported here: https://forums.oneplus.net/threads/alert-slider-implementation-affects-android-public-api.555216/
 

akxak

Senior Member
Mar 2, 2006
523
108
73
Bonn, DEU
I use Tasker for this, too and that allows to control it by time, even consider holidays or weekends as well as locations (silent at work). And that is only a small thing, Tasker can do.
 

akxak

Senior Member
Mar 2, 2006
523
108
73
Bonn, DEU
I use Tasker and the Sound Mode Plugin.

Create two tasks (Silent and Normal), where you use the Sound Mode Plugin to switch to the desired mode.

Create a profile with the proper condition (time, week-day, location) and use the Silent Task as In- and the Normal Task as Exit Task.

That's it. With additional work, you can even evaluate your calendar for holidays to control a variable so your phone stays silent on week holidays...
 

godzifa

Senior Member
Jul 3, 2011
160
35
0
Hi guys,

I tried to do something with Tasker but it didn't work. Could help me please?

Here's my profile:
Code:
<TaskerData sr="" dvi="1" tv="5.0u5m">
<Profile sr="prof6" ve="2">
<cdate>1503938438883</cdate>
<edate>1503990405048</edate>
<id>6</id>
<mid0>5</mid0>
<nme>Dnd Dim-jeu</nme>
<Day sr="con0">
<wday0>4</wday0>
<wday1>1</wday1>
<wday2>5</wday2>
<wday3>3</wday3>
<wday4>2</wday4>
</Day>
</Profile>
<Task sr="task5">
<cdate>1503938299209</cdate>
<edate>1503989725138</edate>
<id>5</id>
<nme>DND semaine</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>312</code>
<Int sr="arg0" val="1"/>
<ConditionList sr="if">
<bool0>And</bool0>
<Condition sr="c0" ve="3">
<lhs>%TIME</lhs>
<op>7</op>
<rhs>09.00</rhs>
</Condition>
<Condition sr="c1" ve="3">
<lhs>%TIME</lhs>
<op>6</op>
<rhs>07.00</rhs>
</Condition>
</ConditionList>
</Action>
</Task>
</TaskerData>
And my task:
Code:
<TaskerData sr="" dvi="1" tv="5.0u5m">
<Task sr="task5">
<cdate>1503938299209</cdate>
<edate>1503991151598</edate>
<id>5</id>
<nme>DND semaine</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>312</code>
<Int sr="arg0" val="1"/>
<ConditionList sr="if">
<bool0>And</bool0>
<Condition sr="c0" ve="3">
<lhs>%TIME</lhs>
<op>7</op>
<rhs>22.00</rhs>
</Condition>
<Condition sr="c1" ve="3">
<lhs>%TIME</lhs>
<op>6</op>
<rhs>07.00</rhs>
</Condition>
</ConditionList>
</Action>
</Task>
</TaskerData>
 

arabcamel

Senior Member
Oct 19, 2010
477
62
0
Hi guys,

I tried to do something with Tasker but it didn't work. Could help me please?

Here's my profile:
Code:
<TaskerData sr="" dvi="1" tv="5.0u5m">
<Profile sr="prof6" ve="2">
<cdate>1503938438883</cdate>
<edate>1503990405048</edate>
<id>6</id>
<mid0>5</mid0>
<nme>Dnd Dim-jeu</nme>
<Day sr="con0">
<wday0>4</wday0>
<wday1>1</wday1>
<wday2>5</wday2>
<wday3>3</wday3>
<wday4>2</wday4>
</Day>
</Profile>
<Task sr="task5">
<cdate>1503938299209</cdate>
<edate>1503989725138</edate>
<id>5</id>
<nme>DND semaine</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>312</code>
<Int sr="arg0" val="1"/>
<ConditionList sr="if">
<bool0>And</bool0>
<Condition sr="c0" ve="3">
<lhs>%TIME</lhs>
<op>7</op>
<rhs>09.00</rhs>
</Condition>
<Condition sr="c1" ve="3">
<lhs>%TIME</lhs>
<op>6</op>
<rhs>07.00</rhs>
</Condition>
</ConditionList>
</Action>
</Task>
</TaskerData>
And my task:
Code:
<TaskerData sr="" dvi="1" tv="5.0u5m">
<Task sr="task5">
<cdate>1503938299209</cdate>
<edate>1503991151598</edate>
<id>5</id>
<nme>DND semaine</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>312</code>
<Int sr="arg0" val="1"/>
<ConditionList sr="if">
<bool0>And</bool0>
<Condition sr="c0" ve="3">
<lhs>%TIME</lhs>
<op>7</op>
<rhs>22.00</rhs>
</Condition>
<Condition sr="c1" ve="3">
<lhs>%TIME</lhs>
<op>6</op>
<rhs>07.00</rhs>
</Condition>
</ConditionList>
</Action>
</Task>
</TaskerData>
There is a built in task (in Tasker) called "Do Not Disturb". Use that for the task - my profile was time based to trigger it. That's all you should need for a basic one. If you are trying to make it more complicated, maybe post a screen shot as it's difficult for me to read through the text programming of Tasker that you posted.
 

GroovyGeek

Senior Member
Oct 11, 2010
895
185
0
This is very easily done with Tasker.
Can you post your profile? I used to do this with Tasker once upon a time but those profiles do not work on the OP5. Seems like OP fubar-ed the Dnd function royally with that incredibly stupid slider decision

Unfortunately this does not work for me. Does the slider need to be in a particular position for this to work? When I set it in the lowest (enabled) position the alarms come through?

I use LIama for this... :)
Again, details please. If I don't find a solution I am sending the OP5 back. This is a complete deal breaker for me. Having to physically flip a switch when the OS has done that for quite some time is just plain dumb.

---------- Post added at 12:17 AM ---------- Previous post was at 12:10 AM ----------

There is a built in task (in Tasker) called "Do Not Disturb". Use that for the task - my profile was time based to trigger it. That's all you should need for a basic one. If you are trying to make it more complicated, maybe post a screen shot as it's difficult for me to read through the text programming of Tasker that you posted.
This is what my profile does but it does not appear to silence the phone. I set up a basic task

Condition
Time 22:00-07:00
Day MTWRF

Entrance task
Do not disturb: Priority

Exit task
Do not disturb: All

When the profile is active incoming emails will still produce alarms when the slider is in the bottom position. Suggestions?
 

arabcamel

Senior Member
Oct 19, 2010
477
62
0
This is what my profile does but it does not appear to silence the phone. I set up a basic task

Condition
Time 22:00-07:00
Day MTWRF

Entrance task
Do not disturb: Priority

Exit task
Do not disturb: All

When the profile is active incoming emails will still produce alarms when the slider is in the bottom position. Suggestions?
Putting the slider in the middle position does the same as putting Tasker DND to priority. If you are looking for "Silent" function which is similar to putting Tasker in up position, then choose the audio tasks and silence notifications, media, and Ringtones separately. Your exit task for the profile can be to raise the volume of all 3 back to normal.
 

godzifa

Senior Member
Jul 3, 2011
160
35
0
Here are my profiles (for week day and the weekend):
Code:
<TaskerData sr="" dvi="1" tv="5.0u6m">
<Profile sr="prof4" ve="2">
<cdate>1505366333629</cdate>
<edate>1506002648183</edate>
<id>4</id>
<mid0>3</mid0>
<nme>Semaine</nme>
<Time sr="con0">
<fh>22</fh>
<fm>0</fm>
<th>6</th>
<tm>45</tm>
</Time>
<Day sr="con1">
<wday0>4</wday0>
<wday1>1</wday1>
<wday2>5</wday2>
<wday3>2</wday3>
<wday4>3</wday4>
</Day>
</Profile>
<Task sr="task3">
<cdate>1505366236467</cdate>
<edate>1505419999663</edate>
<id>3</id>
<nme>Dnd</nme>
<Action sr="act0" ve="7">
<code>312</code>
<Int sr="arg0" val="1"/>
</Action>
</Task>
</TaskerData>

<TaskerData sr="" dvi="1" tv="5.0u6m">
<Profile sr="prof2" ve="2">
<cdate>1505366333629</cdate>
<clp>true</clp>
<edate>1506002644564</edate>
<id>2</id>
<mid0>3</mid0>
<nme>Weekend</nme>
<Time sr="con0">
<fh>23</fh>
<fm>30</fm>
<th>9</th>
<tm>0</tm>
</Time>
<Day sr="con1">
<wday0>7</wday0>
<wday1>6</wday1>
</Day>
</Profile>
<Task sr="task3">
<cdate>1505366236467</cdate>
<edate>1505419999663</edate>
<id>3</id>
<nme>Dnd</nme>
<Action sr="act0" ve="7">
<code>312</code>
<Int sr="arg0" val="1"/>
</Action>
</Task>
</TaskerData>
And my task:
Code:
<TaskerData sr="" dvi="1" tv="5.0u6m">
<Task sr="task3">
<cdate>1505366236467</cdate>
<edate>1505419999663</edate>
<id>3</id>
<nme>Dnd</nme>
<Action sr="act0" ve="7">
<code>312</code>
<Int sr="arg0" val="1"/>
</Action>
</Task>
</TaskerData>
They all work!
 

astracd

Senior Member
Jul 6, 2014
675
207
73
Again, details please. If I don't find a solution I am sending the OP5 back.
LIama
Create new profile
Change ringtone volume / change notification volume / change ring/vibrate/silent mode
So you can change all 3 however you prefer...

Save profile... and each time you open LIama... and press on that profile it will switch to whatever you decided to have...

Also you can make it to do it by location, trigger by apps... etc...

I have few profiles... for car when I get to car it makes volume higher... when I get home it makes it lower... when I get to work it make it silent + vibration...

I believe you can make it by time as well, but I never try so it is not 100%...
 
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