Tasker, Lollipop, and do not disturb mode

6,534 views
Skip to first unread message

Sito Astor

unread,
Oct 20, 2014, 1:40:21 PM10/20/14
to tas...@googlegroups.com
Hi, i have installed the las android lollipop preview over a nexus 5.
The N5 is rooted and working properly using tasker.
The problem appears with the Do Not Disturb.
I can enable it with tasker, but i can not disable it, i have to disable it manually with the volume keys.
Is an issue on DND mode on tasker?
Anybody experiencing the same problem?

Over lollipop is another way to cancel notifications at a time?, using 0 volume is not working because activates the vibrating mode.

Thank you.

Ben Shapiro

unread,
Oct 24, 2014, 3:51:42 PM10/24/14
to tas...@googlegroups.com
I am experiencing the same issue, and also have not found a good solution as of yet.

Sito Astor

unread,
Oct 24, 2014, 4:17:32 PM10/24/14
to tas...@googlegroups.com
I'm afraid we should wait for a lollipop fully compatible Tasker version.

Pent

unread,
Oct 25, 2014, 3:04:16 AM10/25/14
to tas...@googlegroups.com
Are you talking about the Silent Mode action ?

Pent

Sito Astor

unread,
Oct 25, 2014, 3:42:58 AM10/25/14
to tas...@googlegroups.com
Yes, you can enable with Tasker, but the do not disturb mode can't be disabled from Tasker.

Pent

unread,
Oct 25, 2014, 9:43:56 AM10/25/14
to tas...@googlegroups.com


Yes, you can enable with Tasker, but the do not disturb mode can't be disabled from Tasker.

OK, will test when my N5 gets 5.0.

Pent

Tommy Haywood

unread,
Oct 28, 2014, 6:16:13 PM10/28/14
to tas...@googlegroups.com
I don't mean to be rude, but isn't that why Google do a developer preview.

I also have the same issue. Silent in tasker enables "priority mode", but deactivate silent does not disable priority mode

Sito Astor

unread,
Oct 28, 2014, 7:33:06 PM10/28/14
to tas...@googlegroups.com
No problem, I understand that us a developer preview, is just somebody has a solution and notify the Tasker developer for the lollipop version

Pent

unread,
Oct 29, 2014, 2:49:46 AM10/29/14
to tas...@googlegroups.com

I don't mean to be rude, but isn't that why Google do a developer preview.

So that consumers can run it and complain to developers ?

Don't think so, no, otherwise it would be just called 'preview', right ?

Pent

Kevin

unread,
Nov 5, 2014, 7:06:38 PM11/5/14
to tas...@googlegroups.com
You're right and I feel the intention of the preview is to allow developers to test and update their apps against the upcoming update to keep users happy and prevent a torrent of bug reports on launch day.

Pent

unread,
Nov 6, 2014, 2:18:37 AM11/6/14
to tas...@googlegroups.com


You're right and I feel the intention of the preview is to allow developers to test and update their apps against the upcoming update to keep users happy and prevent a torrent of bug reports on launch day.

I had been using it as such, but reverted my phone to 4.4.4 just prior to this bug being reported, so now I'm going to wait.

Pent

Tommy Haywood

unread,
Nov 16, 2014, 3:08:28 PM11/16/14
to tas...@googlegroups.com
I am also a developer so not just a consumer. It was not a complaint. Many apps are broken after the official roll out is hitting phones, so clearly the preview has not entirely done it's job.

Pent

unread,
Nov 17, 2014, 2:48:51 AM11/17/14
to tas...@googlegroups.com
Well, from my point of view it caught a few crash bugs and bugs in the most popular functionality,
so it was a lot better than nothing.

Pent

Yoni Blau

unread,
Nov 22, 2014, 9:17:48 AM11/22/14
to tas...@googlegroups.com, sito...@gmail.com
Same problem here.  By using silent mode in tasker it will enable the "priority notifications."  However, the current version of tasker does not recognize that it is enabled (variables with "if" on/off conditions do not change from red to green).  I was not able to to turn off priority notifications through tasker.  Also has anyone figured out a way to enable/disable the "do not disturb" mode?  I think the ultimate solution is that an updated version of tsaker needs new functions to interact with the new "priority notifications" and "do not disturb" modes.

Pent

unread,
Nov 23, 2014, 6:45:39 AM11/23/14
to tas...@googlegroups.com, sito...@gmail.com
Had some time to look at this.

I found a bug that when setting Silent Mode on with Tasker it's still reported as being off by %SILENT (which gets the data from Android of course). I found that if I set silent mode on, wait a short while, then do it again, Android finally reports silent mode as being on, so I've added a workaround in the code to do that on Lollipop.

Apart from that, things seem to function correctly.

If someone finds a scenario that doesn't work (even taking into the account the bug I described above), please describe exactly what action and parameters you are using, what you expect to happen, and what is happening.

Thanks,

Pent

p.s. I don't know what people mean by 'Do Not Disturb' mode, I havn't been able to find that either in my Nexus 5 settings or in the API guide. I presume they mean the same thing as 'silent mode'

Pent

unread,
Nov 23, 2014, 6:46:56 AM11/23/14
to tas...@googlegroups.com, sito...@gmail.com
p.s. I specifically couldn't reproduce the OPs problem on my N5/Android 5.0 OTA. If I set Silent Mode, off, it works fine. Perhaps a problem with the Android preview ?

Pent

Nate Gantt

unread,
Nov 23, 2014, 12:10:21 PM11/23/14
to tas...@googlegroups.com, sito...@gmail.com
I'm not sure, but I think people are talking about a way to switch between "All," "Priority," and "None". There doesn't seem to be a way to do this. If I have Tasker put the phone in Silent Mode On, then my phone goes into Priority Mode.

Pent

unread,
Nov 23, 2014, 2:03:47 PM11/23/14
to tas...@googlegroups.com, sito...@gmail.com


I'm not sure, but I think people are talking about a way to switch between "All," "Priority," and "None". There doesn't seem to be a way to do this. If I have Tasker put the phone in Silent Mode On, then my phone goes into Priority Mode.

I can't find any relevant API about those 'interrupt' modes in the Android documentation unfortunately.

Pent

Steve Oldham

unread,
Nov 25, 2014, 3:33:17 AM11/25/14
to tas...@googlegroups.com, sito...@gmail.com
I hadn't realised that invoking 'Silent Mode' with Tasker actually sets priority mode. 

That helps my understanding a bit, but I still have an issue - as far as I can see, Priority Mode does not disable vibrate, so any non-priority notifications cause my phone to vibrate, even if the sound is off. Very irritating at 3:15 in the morning, as I discovered today!

 Am I missing something? Is there any way around this?

Zappos

unread,
Nov 25, 2014, 3:38:30 AM11/25/14
to tas...@googlegroups.com, sito...@gmail.com
 Hi Pent,

I have rooted and s-off HTC One M8 now on Lollipop. I have a task that toggles the various states, ie silent, vibrate normal. Used to work fine on 4.4.4 but doesn't on Lollipop. Its the same issue you describe in that the %SILENT doesnt set to On. My task looks for this as part of the if loop. Can't get it to work at all even with a delay.
Works ok if I just have a task setting Silent to off. Just seems to be the system variable not getting set correctly.

Pent

unread,
Nov 25, 2014, 5:59:33 AM11/25/14
to tas...@googlegroups.com, sito...@gmail.com

I have rooted and s-off HTC One M8 now on Lollipop. I have a task that toggles the various states, ie silent, vibrate normal. Used to work fine on 4.4.4 but doesn't on Lollipop. Its the same issue you describe in that the %SILENT doesnt set to On. My task looks for this as part of the if loop. Can't get it to work at all even with a delay.

No, it needs to be applied twice with a delay in-between, which is what my workaround does.

Pent

eXtorian

unread,
Nov 27, 2014, 5:19:00 PM11/27/14
to tas...@googlegroups.com, sito...@gmail.com
On Tuesday, November 25, 2014 10:59:33 AM UTC, Pent wrote:
No, it needs to be applied twice with a delay in-between, which is what my workaround does.

I suspect there's more to it for some people.

I've been trying to figure this out for a few days now, and have even gone so far as to logging every notification I get with an AutoNotification Intercept and logging the current volumes and silent mode to a file.

So here's what I found...

Setting Silent Mode = On via Tasker puts it in Priority Mode. Sometimes %SILENT says it's actually "Vibrate" and sometimes it's actually set as "On". I can't figure out what decides this.

For what it's worth, I also set all volumes (other than Alarm) to 0. This was because a few years ago one/some of my apps were annoyingly using the Media audio channel for notification sounds instead of the Notification channel, and Silent Mode didn't silence the Media audio channel on that phone. Anyway...

Adding a 1 second Wait and putting it in Silent Mode again (as Pent said) puts it in Priority Mode without vibrate. You'd think this would allow for a good nights sleep right? Nope...

Sometimes an app comes along (WhatsApp does this, although some people on XDA claim the latest version directly from their website fixes this) and fires off a notification. When this happens, all the volumes are set to 1 if they were previously set to 0. My log shows that before the notification the volumes were all 0 and Silent Mode "on", and after the WhatsApp notification all the volumes are 1 and Silent Mode is still "on". I'm woken up by hearing the very quiet notification.

Also, my logs seem to imply that if you set the volumes to 0, then enter Silent Mode, they (sometimes?) become 1 again, almost as if Silent Mode is setting the volumes to 1 if they are 0 already.

The only combination I've found that actually gives me a silent night's sleep, and allow me to hear my alarm in the morning, is:

Alarm Volume = (whatever you want)
Silent Mode = On
Media Volume = 0
Notification Volume = 0
Ringer Volume = 0
System Volume = 0
Wait 1 second
Silent Mode = On
Media Volume = 0
Notification Volume = 0
Ringer Volume = 0
System Volume = 0

As a disclaimer, I only have a very limited number of examples in my logs of what's going on, so I may be wrong, and may be over complicating it.

If anyone has any feedback (is that wait long enough?) or needs any further info I'm more than happy to help.

Nikhil Nayak

unread,
Nov 28, 2014, 12:48:44 AM11/28/14
to tas...@googlegroups.com, sito...@gmail.com
Having the same issue with tasker after the lollipop update. Tasker seems to be clashing with android and the phone hangs when a few profiles get active. Profiles mainly including Wi-Fi toggling, audio silencing, and locational profiles. It was eventually going to fail since they last updated tasker on the 11th of October... way before the 5.0 roll-out. Just have to wait and see i guess. they're probably having issues with 5.0 API compatibility - something that should've been figured out during the developer launch i guess....

Pent

unread,
Nov 28, 2014, 1:48:43 AM11/28/14
to tas...@googlegroups.com, sito...@gmail.com


Having the same issue with tasker after the lollipop update. Tasker seems to be clashing with android and the phone hangs when a few profiles get active. Profiles mainly including Wi-Fi toggling, audio silencing, and locational profiles. It was eventually going to fail since they last updated tasker on the 11th of October... way before the 5.0 roll-out. Just have to wait and see i guess. they're probably having issues with 5.0 API compatibility - something that should've been figured out during the developer launch i guess....

This thread is about the audio thing, if you have other problems, please take them to different threads.

Pent

Clive

unread,
Nov 28, 2014, 7:08:44 AM11/28/14
to tas...@googlegroups.com, sito...@gmail.com
Aarghh - this Lollipop update is driving me mad (Nexus 4) - I just had everything working perfectly between Tasker and Lightflow with profiles for work and night (work was silent, but the LED notifications still showed, Night was silent/no LEDs/VIP calls would get through) and this has messed it up. I think (or hope) I've killed the vibrate using the above, but it's still messing with my LED notifications. Hopefully, someone will find a way to completely disable the Android priority notifications (without rooting/custom ROM) - you would think that with such a change, google would put an option in to disable it for those not wanting it.

Kevin Condon

unread,
Dec 3, 2014, 1:59:19 PM12/3/14
to tas...@googlegroups.com, sito...@gmail.com
Pent,

Some (probably me after I eventually update to Lollipop) will end up wanting the behavior that your double-set-silent fixed, i.e., the ability to switch to "priority mode." With your fix, there won't be any way to automate it from Tasker. Of course we'll also need access to the full silent behavior as well. Would you consider adding something to allow us to automate both? The Android developer changes for 5.0 says in the Sound and Vibration section, "Setting the device to RINGER_MODE_SILENT causes the device to enter the new priority mode. The device leaves priority mode if you set it to RINGER_MODE_NORMAL or RINGER_MODE_VIBRATE." It might make sense to add a Silent Mode action option for priority mode, so the dropdown options would become On/Priority/Vibrate/Off. I can't tell whether you can choose vibration when in Priority mode, but I think I read that it always uses sound in Priority mode. That may make a difference as to the best way to set this up.

Gigaom has a nice explanation of Lollipop's priority mode from a UI perspective.

Thanks for making possible the awesome things I can do on my Androids with Tasker!

Thanks,
Kevin

Kevin Condon

unread,
Dec 3, 2014, 8:12:36 PM12/3/14
to tas...@googlegroups.com, sito...@gmail.com
One other thing to note with this is that the Lollipop Silent mode is *completely* silent. Like not even alarms. People who have Tasker profiles that set silent mode at night are *not* going to hear their alarms in the morning with Lollipop. At least that's the way things look to me. Maybe someone using using the double-set-silent workaround with Tasker can confirm that? If so, this is the kind of thing that merits a first-run modal dialog in the updated Tasker to warn people that their existing profiles won't work the same.

Kevin

Pent

unread,
Dec 4, 2014, 3:57:39 AM12/4/14
to tas...@googlegroups.com, sito...@gmail.com
Thanks for the very informative post Kevin, I think you're right.

Testing some more, looks like the first time I set silent mode, PRIORITY is set (I had thought that nothing happened), second time (i.e. if it's already in PRIORITY) it switches to NONE (however, seems to be an Android bug, it still shows as PRIORITY in the ringer dialog just to confuse things).

Wish Google had added a couple of API calls to handle the new functionality, as it is I'm going to have to try and workout what modes (vibrate/audio, none/priority/all) the device is in from the various combinations of the old silent mode setting and the ringer volume. Don't know yet if that's going to be possible, or how things will change with coming Lollipop updates, since the combinations aren't documented anywhere.

Pent

Kevin Condon

unread,
Dec 4, 2014, 9:15:33 AM12/4/14
to tas...@googlegroups.com, sito...@gmail.com
I was looking over my Tasker projects and see 2 that set silent mode, one for church and one for sleeping. The Lollipop no-interruption mode will make the church one work even better, since I don't have to worry any more about an alarm or event notification accidentally getting through. The double-set-silent workaround in Tasker isn't a big deal to put in place.

My sleeping project sets silent and then selectively enables ringing for favorite contacts. With priority mode, I can eliminate the profiles that manage the favorite contacts and configure it in Android. But if the device is already in priority mode when my Tasker profile activates, setting silent will put it in the Lollipop no-interruption mode. So there I will workaround by setting silent off/delay 1 sec/set silent on. I don't think I've seen anyone mention this scenario yet, but it's bound to happen to someone.

Kevin

Pent

unread,
Dec 4, 2014, 9:31:43 AM12/4/14
to tas...@googlegroups.com, sito...@gmail.com
I've found an API for querying the current mode (a fellow developer put me on to it).

However, it requires that a NotificationListenerService is running i.e. Tasker would
need to be checked under the list in Android Settings / Sound And Notification / Notification access.

Seems a bit over the top just to be able to query/set the ringer mode...

Still pondering this one.

Pent

eXtorian

unread,
Dec 4, 2014, 11:51:41 AM12/4/14
to tas...@googlegroups.com, sito...@gmail.com
I've been using Lollipop and Tasker for several days now.

Nowhere does Tasker set the new "All" silent mode. When Tasker sets Silent Mode on it puts it in Priority (sometimes with vibrate on).

If you wait 1 second and set Silent Mode on a second time it puts it in Priority with no vibrate.

In both cases, Alarms will sound at the volume the Alarm volume is set at.

Some apps further complicate matters, because they don't use the correct audio streams. An example is WhatsApp, that used to use (and possibly still does) the Media stream for notifications. I've logged really odd behaviour when the phone is supposedly on Priority mode, but a WhatsApp notification comes in and suddenly all the volumes are set to 1, despite Silent mode still being on. You then hear the notification very quietly.

I've also noticed that if you set Silent Mode on, then set all volumes (other than Alarm) to 0, wait a second, then set Silent Mode on again and set all volumes to 0 again, this seems to work for everything and essentially brings back the KitKat version of Silent Mode, with the added advantage you can set people or apps as Priority and still get emergency calls from important people etc.

While a simple workaround would be to detect Lollipop and instead of "Silent Mode On" do "Silent Mode On + Wait 1 second + Silent Mode On", this actually reduces functionality, because some people might want to put it on Priority + Vibrate (i.e. just one Silent Mode On).

I'd love to see the full Lollipop options exposed by Tasker. I'd personally imagined it as having a drop down in the Silent Mode task that in KitKat just has On or Off, but in Lollipop has "Priority Mode Vibrate", "Priority Mode" and "All".

As people would normally expect the behaviour from one version of Android to the next to be the same, Tasker could map KitKat's "On" to "Priority Mode" on Lollipop by default.

Pete

unread,
Dec 4, 2014, 2:10:26 PM12/4/14
to tas...@googlegroups.com, sito...@gmail.com
Strange, I'm trying the (Silent/Wait/Silent) method to get to the None mode and it just stays in Priority.  Pent, I don't blame you one bit for waiting to see what gets documented before trying to create workarounds that could even be broken in the upcoming 5.0.1 update.

Pent

unread,
Dec 5, 2014, 2:32:43 AM12/5/14
to tas...@googlegroups.com, sito...@gmail.com


Strange, I'm trying the (Silent/Wait/Silent) method to get to the None mode and it just stays in Priority.  

In my testing it's still labelled as priority but the volume slider has disappeared, and trying to change the volume highlights the
None label.

I've decided to revert my built-in-to-code double-application hack because as Kevin says it may cause people to miss alarms.

After the next Tasker update (week or so) I will see what the Android update looks like and make changes then. The changes will probably require an extra service to be running (great work Google), which my testing has shown to be pretty unreliable in 5.0 anyway (more great work Google).

Pent

eXtorian

unread,
Dec 5, 2014, 4:20:36 AM12/5/14
to tas...@googlegroups.com, sito...@gmail.com


On Friday, December 5, 2014 7:32:43 AM UTC, Pent wrote:


Strange, I'm trying the (Silent/Wait/Silent) method to get to the None mode and it just stays in Priority.  

In my testing it's still labelled as priority but the volume slider has disappeared, and trying to change the volume highlights the
None label.

This is relevant then...

I have a "Silent while charging if between 11pm and 8am" profile that kicks in every night when I go to bed. My phone alarm wakes me up every morning.

It runs a Silent Task (not Action) that does the following:
  1. Silent Mode = On
  2. Media Volume = 0
  3. Notification Volume = 0
  4. Ringer Volume = 0
  5. System Volume = 0
  6. Wait 1 second
  7. Silent Mode = On
  8. Media Volume = 0
  9. Notification Volume = 0
  10. Ringer Volume = 0
  11. System Volume = 0
Note that I'm NOT changing the Alarm volume anywhere (it's set at it's highest level).

Yet, my phone Alarm still wakes me up every morning and priority callers can get through.

If it were on None, neither would happen.

Maybe setting the volumes after entering Silent Mode changes the behaviour? But this trick of Silent Mode + Volumes to 0 was the only way I could get WhatsApp to shut up through the night.

This is on stock (now unrooted, thanks Google) Lollipop Nexus 5.

According to my logs (I'm logging the above 4 volumes and %SILENT every time I get a notification or enter or leave silent mode), the first Silent Mode = On puts it in Priority Vibrate, and the second one puts it in "On" (i.e. Priority Only). You can see this for yourself by putting your phone in "All" mode and then doing:
  1. Write File Append SILENT%
  2. Silent Mode = On
  3. Write File Append SILENT%
  1. Wait 1 second
  2. Silent Mode = On
  1. Write File Append SILENT%
Your log will show:
Off
Vibrate
On

Stéphane Poulin

unread,
Dec 5, 2014, 1:48:51 PM12/5/14
to tas...@googlegroups.com, sito...@gmail.com
This work great!

Thanks for sharing!

Kevin Condon

unread,
Dec 5, 2014, 8:57:49 PM12/5/14
to tas...@googlegroups.com
I updated my N4 to Lollipop and no surprises with the notification modes. I tested with phone calls, timers, and alarms in each mode.

1. Silent:On + Wait:1s + Silent:On = None. No sound got through. I saw exactly what Pent did; the notification bar showed the star and the volume UI said it was in Priority mode, but there was *no* sound. The UI is broken.

2. Silent:Off + Wait:1s + Silent:On = Priority. Only what I allowed in the priority settings and alarms/timers got through. Also, *after* those 3 actions, I set the volume levels to 1 since I use Priority mode for sleeping. The lower volumes took effect, and when the Profile exited, Tasker restored the previous volume levels. Note that the first Silent:Off is important to avoid switching to None in the event that the task runs when Priority mode is already enabled.

These cover all of my uses. So other than Google fixing their UI, the workarounds are acceptable for me.

Kevin

Pete

unread,
Dec 5, 2014, 9:53:59 PM12/5/14
to tas...@googlegroups.com
Thanks for spelling out for me. I did not catch the part about the UI not reflecting the actual mode.

eXtorian

unread,
Dec 6, 2014, 1:00:24 PM12/6/14
to tas...@googlegroups.com
On Saturday, December 6, 2014 1:57:49 AM UTC, Kevin Condon wrote:

1. Silent:On + Wait:1s + Silent:On = None. No sound got through. I saw exactly what Pent did; the notification bar showed the star and the volume UI said it was in Priority mode, but there was *no* sound. The UI is broken.

2. Silent:Off + Wait:1s + Silent:On = Priority. Only what I allowed in the priority settings and alarms/timers got through. Also, *after* those 3 actions, I set the volume levels to 1 since I use Priority mode for sleeping. The lower volumes took effect, and when the Profile exited, Tasker restored the previous volume levels. Note that the first Silent:Off is important to avoid switching to None in the event that the task runs when Priority mode is already enabled.

Respectfully, I disagree. I've tested this again just now to be triple sure. Scenario 1 is Priority for me, just like the UI says.

Using scenario 1 (Silent Mode On + Wait + Silent Mode On), what did you use to see if you got any sounds? Unless you've actually changed the Interruption settings, it is expected that you would not get any sounds in Priority mode, other than Alarms.

Did you try setting a Priority application and getting a notification from it? Did you try an Alarm? Did you try setting Starred contacts as Priority, turning on Calls in the Interruption settings, and calling your phone from one? Because ALL of these sound for me in Scenario 1, just like it should in Priority Mode, and just like the UI is reporting.

To be clear, in Scenario 1, the UI reports Priority mode and it behaves exactly like Priority mode should - i.e I get no sounds at all unless it's a specified priority application or Alarm or contact. Also, the task I described above runs every night for me, yet my Alarm wakes me up every morning.

Tasker is certainly not putting it in "None" mode using Scenario 1, because that's exactly what I'm running every night, and I'd have slept in every day for work for the past week if my Alarm hadn't sounded.

Scenario 2 puts it in Priority + Vibrate for me.

Kevin Condon

unread,
Dec 6, 2014, 10:28:11 PM12/6/14
to tas...@googlegroups.com
eXtorian,

I retested with an alarm and a phone call from a priority caller. You are right about alarms sounding with Silent:On + Wait:1s + Silent:On. But my priority caller did not ring. My earlier test must have tested only the calls. But I tested and retested a couple of times just now, so I'm sure of this particular result. Isn't this identical to the pre-Lollipop Silent:On? My task is exactly those 3 actions and nothing else. My Interruptions settings allow calls and messages from Starred contacts only. My "When calls and notifications arrive" setting is "Always interrupt" so I don't have any priority applications.

I've never had vibration in any of my tests, but I noticed that you set volumes to 0. When I added Alarm:0 to the end of the tasks in either of the 2 scenarios, my alarm did vibrate instead of sound. The vibrate icon never showed though, only the star. I was wondering how to set vibrate in these interruption modes. Now I know. :)

So it appears that the current version of Tasker has no way to activate Lollipop's "None" interruption mode. But it can be made to set Priority mode, Priority mode + vibration, and something that works like the old silent mode did.

BTW, I'm testing with a Nexus 4.

Kevin

eXtorian

unread,
Dec 7, 2014, 8:24:10 AM12/7/14
to tas...@googlegroups.com
I think we're on the same page, other than Starred Callers do ring for me on Silent + wait + Silent.

Yes, I agree... Tasker cannot currently get "None" by any means, but it can set Priority - which is essentially the old KitKat Silent Mode with some "priority" exceptions.

Pent

unread,
Dec 10, 2014, 8:07:59 AM12/10/14
to tas...@googlegroups.com, sito...@gmail.com
OK, my plan is as follows:

* everything stays the same for pre-lollipop devices.

For Lollipop:

* %SILENT reports 'on' when ringer mode is NORMAL (pre-lollipop, 'off') but the interrupt mode is PRIORITY or NONE (for backwards compat).
* Silent Mode action only offers OFF or VIBRATE for new actions, for already-existing actions ON puts the phone in priority mode
* new Interrupt Mode action allows switching between NONE, PRIORITY and ALL
* new Interrupt Mode state (or variable, undecided) responds to changes in interrupt mode (none, priority or all)

All the Lollipop features will require Tasker's notification listener service to be enabled unfortunately.

I hope to have a beta with these implemented in 2 or 3 days, testing for a few days and release on the 17th

Pent

Kevin Condon

unread,
Dec 10, 2014, 1:13:56 PM12/10/14
to tas...@googlegroups.com

Thanks, Pent! That sounds great. Maybe the notification monitoring will be groundwork for some interesting future Tasker features that allow automating based on arbitrary app notifications.

Regards,
Kevin

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/4ClJf95kRpE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Pent

unread,
Dec 10, 2014, 1:53:46 PM12/10/14
to tas...@googlegroups.com


Thanks, Pent! That sounds great. Maybe the notification monitoring will be groundwork for some interesting future Tasker features that allow automating based on arbitrary app notifications.


I may be able to improve some related Tasker features, but I'm not going to step on the toes of the AutoNotification plugin too much.

Pent

Pete

unread,
Dec 10, 2014, 10:32:13 PM12/10/14
to tas...@googlegroups.com, sito...@gmail.com
Thank you Pent, sounds like this will cover what I used to do with Silent Mode.

Is this Interrupt Mode the new official API way of controlling this thing, or is it a workaround you came up with?  The reason I ask is that as I've been exploring this new functionality of NONE/PRIORITY/ALL I've come up with some ideas of automating the Priority settings, specifically switching on or off the Reminders, Calls, and Messages switches.  And I was wondering that if those are built in to the API, might they someday be available in Tasker?  (This is certainly nothing I would be expecting for the upcoming 12/17 release)

Thanks for taking the time to dig in to interrupt mode!

Pent

unread,
Dec 11, 2014, 2:21:48 AM12/11/14
to tas...@googlegroups.com, sito...@gmail.com

Is this Interrupt Mode the new official API way of controlling this thing

Yes.

The function is however labelled ominously 'request' rather than 'set', meaning Android will ignore it if it feels like it.
 
, or is it a workaround you came up with?  The reason I ask is that as I've been exploring this new functionality of NONE/PRIORITY/ALL I've come up with some ideas of automating the Priority settings, specifically switching on or off the Reminders, Calls, and Messages switches.  And I was wondering that if those are built in to the API

They're not, that I've seen at least.

Pent

Pent

unread,
Dec 13, 2014, 3:25:04 AM12/13/14
to tas...@googlegroups.com, sito...@gmail.com
I've just posted a beta with these features, would be great if some people from this thread could test it before I publish on
17th.

The only difference from the stated plan is that I made a new variable %INTERRUPT instead of a state for monitoring the current interrupt mode (since %SILENT must be used for monitoring vibrate mode it seemed more consistent)

Pent

Kevin Condon

unread,
Dec 13, 2014, 11:43:05 AM12/13/14
to tas...@googlegroups.com

Hi Pent,

Your changes in the beta work great in all my profiles. Way better than using the workarounds. I tested for quite a while without anything unexpected. Kudos. :)

Thanks,
Kevin

Pent

unread,
Dec 13, 2014, 3:03:58 PM12/13/14
to tas...@googlegroups.com
Thanks for the prompt testing.

Pent

Abdullah Alahdal

unread,
Dec 13, 2014, 4:19:46 PM12/13/14
to tas...@googlegroups.com
I'm not sure if I'm helping here because I have CM12 (Unofficial) installed. The action to change the Interrupt state is working perfectly. But monitoring the variable is not.

Kevin Condon

unread,
Dec 13, 2014, 8:37:02 PM12/13/14
to tas...@googlegroups.com

None of my profiles use the variables, so my testing did not include them.

Kevin

Pent

unread,
Dec 14, 2014, 4:24:00 AM12/14/14
to tas...@googlegroups.com

I'm not sure if I'm helping here because I have CM12 (Unofficial)  installed. The action to change the Interrupt state is working perfectly. But monitoring the variable is not.

You're using a Event / Variable Set ?

Tasker's notification access service is enabled ?

Please try a reboot, in my brief experience with the service it sometimes just stops with no visible sign.

Pent

Abdullah Alahdal

unread,
Dec 14, 2014, 4:57:14 AM12/14/14
to tas...@googlegroups.com
Yes, I'm using Event > Variable Set.
Yes, Tasker is enabled under Notification Access.

I did reboot and it is still the same.

I've noticed that if I flash %INTERRUPT, it shows the current value.

Pent

unread,
Dec 14, 2014, 8:18:21 AM12/14/14
to tas...@googlegroups.com


I did reboot and it is still the same.

I've noticed that if I flash %INTERRUPT, it shows the current value.

OK, can you send me or post a log with you changing the interruption mode a few times
manually (via the Android dialog).

http://tasker.dinglisch.net/userguide/en/faqs/faq-how.html#x2

Thanks,

Pent

Abdullah Alahdal

unread,
Dec 14, 2014, 12:39:48 PM12/14/14
to tas...@googlegroups.com
Log file has been sent.

Abdullah

Pete

unread,
Dec 14, 2014, 2:45:36 PM12/14/14
to tas...@googlegroups.com, sito...@gmail.com
I posted a message in the beta thread about a usability (not Tasker related) that I found with using this mode.  Otherwise, I've gotten through my re-writing and testing and everything is working as expected.

Thanks Pent!

Pent

unread,
Dec 14, 2014, 2:57:53 PM12/14/14
to tas...@googlegroups.com

Log file has been sent.

Abdullah

Thanks very much.

It shows that no mode changes are being received by Tasker from Android. On the other hand, the notification access
service is running OK because Tasker is able to query the current mode to show the value for %INTERRUPT.

My suspicion falls on the Cyanogen ROM not making the callbacks to Tasker's service. Sorry, I don't think there's
anything I can do about it. If you just need to pick up whether priority mode or all, you may be able to use
%SILENT (off or on).

Pent

Kevin Condon

unread,
Dec 14, 2014, 4:48:47 PM12/14/14
to tas...@googlegroups.com

Pent,

Even though I don't use the vars normally, it was easy enough to do a test so you have results from an unrooted N4 with stock ROM. The INTERRUPT var doesn't change for me when switching between priority and all in either direction until I lock the display and then unlock the lock screen. The value just stays at priority or all, whichever was last transitioned to from none. The other 4 transitions were picked up immediately. Android always registered the mode immediately in the status bar.

SILENT worked as you described it would.

Kevin

Pent

unread,
Dec 15, 2014, 3:02:11 AM12/15/14
to tas...@googlegroups.com

Even though I don't use the vars normally, it was easy enough to do a test so you have results from an unrooted N4 with stock ROM. The INTERRUPT var doesn't change for me when switching between priority and all in either direction until I lock the display and then unlock the lock screen. The value just stays at priority or all, whichever was last transitioned to from none. The other 4 transitions were picked up immediately. Android always registered the mode immediately in the status bar.


Thanks for the extra testing. You were changing the mode with the Android dialog or via the Interrupt Mode action ?

Does it work OK straight after a restart ?

Pent

Kevin Condon

unread,
Dec 15, 2014, 10:15:55 PM12/15/14
to tas...@googlegroups.com

Yes, I was changing via the Android dialog. If I get a chance to reboot and test again, I'll let you know.

Pent

unread,
Dec 16, 2014, 5:02:26 AM12/16/14
to tas...@googlegroups.com
Think I've found it, was only occuring on the Play Store version of the beta, not the development version I test with.

Thanks both,

Pent

eXtorian

unread,
Dec 17, 2014, 9:12:07 AM12/17/14
to tas...@googlegroups.com
Found an interesting quirk, which sounds similar to what someone else was mentioning in the beta thread.

Changing certain volumes (at least Notification, but I noted Media didn't) puts it in Vibrate mode if it's in Priority mode.

To reproduce, create a task that does the following:
  1. Interrupt Mode = Priority
  2. Wait 3 seconds (just for clarity)
  3. Notification Volume = 0

Run the task and you'll see it goes into Priority Mode, then 3 seconds later goes into Priority + Vibrate.

It's easy to work around by having a Silent (i.e. Vibrate) Mode = Off, but it is a bit weird.

eXtorian

unread,
Dec 17, 2014, 9:30:15 AM12/17/14
to tas...@googlegroups.com
There's a bit more. I can't get it completely silent any more :(

Starting with your phone in Interrupt = All mode, and volumes at something normal, if you do this:
  1. Notification volume = 0
  2. Write File log.txt %VOLN %SILENT %INTERRUPT
  3. Interrupt Mode = Priority
  4. Write File log.txt %VOLN %SILENT %INTERRUPT
  5. Silent Mode = Off
  6. Write File log.txt %VOLN %SILENT %INTERRUPT
In the log.txt file you get:
0 vibrate all (correct)
0 vibrate priority (correct)
1 on priority (who set the volume to 1?)

The same happens with Ringer and System volume too.

Is there a way to actually get it to have Priority only with no Vibrate? I.e. No sounds, no vibrate, only Alarms and Priority stuff?

eXtorian

unread,
Dec 17, 2014, 9:34:47 AM12/17/14
to tas...@googlegroups.com
In fact, the above actually sets Notification, Ringer, and System volumes all to 1, even if you have never set any of them.

Pent

unread,
Dec 17, 2014, 9:41:56 AM12/17/14
to tas...@googlegroups.com

  1. Write File log.txt %VOLN %SILENT %INTERRUPT
  2. Interrupt Mode = Priority
  3. Write File log.txt %VOLN %SILENT %INTERRUPT
  4. Silent Mode = Off
  5. Write File log.txt %VOLN %SILENT %INTERRUPT
In the log.txt file you get
0 vibrate all (correct)
0 vibrate priority (correct)
1 on priority (who set the volume to 1?)

Well it  wasn't me (Tasker), and it wasn't you, which leaves....

Is there a way to actually get it to have Priority only with no Vibrate?

Why are you setting the notification volume ?

Use Android's priority mode settings to turn of notifications in priority mode.

Pent

eXtorian

unread,
Dec 17, 2014, 10:28:46 AM12/17/14
to tas...@googlegroups.com
Just due to the various issues we've had with Google changing the way volumes and audio channels work on Android over the years.

Even today, Priority Mode does not silent all streams (e.g. Media) and some apps misbehave and use the Media stream instead of the Notification stream when playing audio for their notifications. WhatsApp used to do this, for example.

So I set all volumes apart from Alarm to 0 as well as putting it on Silent Mode.

I'll definitely have to put Media on 0. I'll post back the results in a bit...

eXtorian

unread,
Dec 17, 2014, 3:23:19 PM12/17/14
to tas...@googlegroups.com
This is what I found...

You can, as you said, generally just turn Priority Mode on and that silences most things.

But unfortunately it looks like Lollipop has changed how audio streams work. As such, there are a number of apps that now have a nasty habit of making sounds at 4am, despite being in Priority mode, which is why I wanted to also turn all volumes apart from alarm to 0.

Unfortunately, there seems to be no way now to guarantee the phone makes no sounds, but will still wake you up with an Alarm. If anyone has solution to this, let me know.

You can actually replicate what I'm describing with Tasker's Media Play action by doing:
  1. Interrupt Mode = Priority
  2. Play Media, Some Sound, Stream = Notification
I would expect the above to make no sound, as Notification sounds should be silenced by Priority Mode, but you will still hear the sound. On KitKat, I worked around these noisy apps by setting all volumes (apart from Alarm) to 0 and turning Silent Mode On. I'm guessing that because it's not a true Notification then it's behaving differently.

Which brings me to what I touched on above. You don't seem to be able to set all volumes (apart from Alarm) to 0 and have Priority mode. If Priority Mode is On, then you'll find that System and Notification volumes are set to 1, even if they were 0 and even if you try to set them to 0 before or after Priority Mode. This is what I can't solve.

Finally, and this was actually shown above but I didn't spot it the first time. If you look in my previous post you'll see I set Silent = Off, but it's immediately reported as On... even though I set it to Off.

eXtorian

unread,
Dec 17, 2014, 3:26:23 PM12/17/14
to tas...@googlegroups.com
I should have also mentioned that I think the previous Tasker version's workaround of Silent Mode = On, Wait 1 second, Silent Mode = On, All volumes to 0, did work as expected.

Kevin Condon

unread,
Dec 17, 2014, 8:57:51 PM12/17/14
to tas...@googlegroups.com

eXtorian,

What are your Interruptions settings? Set like mine in the attached screenshot, priority mode silences my phone except for calls and messages from favorite contacts. Priority calls ring at the volume I set in my sleep task (and vibrate because I have the "Also vibrate for calls" enabled). All other calls are completely silent. Wouldn't also switching off Calls and Messages do what you want?

My sleep task does exactly these actions in this order, interrupt:priority, silent:off, alarm/notification/ringer/system:1, notify pulse:off.

Kevin

2014-12-18 01.00.41.png

Jonathan Glabman

unread,
Dec 19, 2014, 3:03:36 AM12/19/14
to tas...@googlegroups.com
I had my calendar setup as profile/state/app/calendar entry. Then new task/audio/silent mode/vibrate.

Forgive me, as I am a little challenged in programming. How and where do I integrate %SILENT and/or %INTERRUPT to make all appointments vibrate, then after exit, revert back to previous settings?

Pent

unread,
Dec 19, 2014, 3:29:16 AM12/19/14
to tas...@googlegroups.com


I had my calendar setup as profile/state/app/calendar entry. Then new task/audio/silent mode/vibrate.

Please make a new thread, this one is discussing a specific problem that is not the same as yours.

Thanks,

Pent

eXtorian

unread,
Dec 19, 2014, 6:35:09 PM12/19/14
to tas...@googlegroups.com
On Thursday, December 18, 2014 1:57:51 AM UTC, Kevin Condon wrote:

What are your Interruptions settings?


I have mine set to Calls (Starred Only), and that's it.

Unfortunately, switching off Calls and Messages would not do what I want for two reasons: I want starred callers to be able to call me in the middle of the night. Also it doesn't solve the problem that Priority Mode does not silence Media audio.

You can test this for yourself by putting your phone in Priority Mode, and then playing a YouTube video - you'll still hear it. Some apps use the Media audio channel for playing sounds for their notifications, and this is the crux of the problem. Even apps that explicitly try to use the Notification audio channel when they play a sound still plays on the Media channel in Lollipop. I gave an example above that you can use in Tasker to see this for yourself.

True Android notifications with audio (i.e. ones where a sound is specified in the Notification API) work correctly, as you'd expect. But, alas, some apps create a Notification without a sound, and then immediately play a sound separately. These are the ones that aren't silenced by Priority mode.

So the short version is - some apps (for whatever reason) end up using the Media audio channel, which Priority mode is not meant to silence, so you still hear these sounds in Priority mode. There is no way to set Media volume to 0 and have Priority mode on, as in Priority mode, Media volume must be at least 1 for some reason.

The end game I'm looking for is:
  • Priority Mode on (Starred Callers and Alarms can get through).
  • Phone makes no sounds and does not vibrate (apart from the above.
The problem is:
  • Android Lollipop does not disable the Media audio channel in Priority mode (Media volume always at least 1).
  • Some apps play sounds via the Media audio channel.
    • Lollipop probably only allows true notifications to play sounds via the Notification audio channel.
Bottom line - there's probably nothing Tasker can do to fix this, unless anyone has any other suggestions?

Pent

unread,
Dec 20, 2014, 3:42:54 AM12/20/14
to tas...@googlegroups.com
>
Android Lollipop does not disable the Media audio channel in Priority mode (Media volume always at least 1).

I can't reproduce that. If I set Media Volume to 0, then Interrupt Mode to priority, afterwards media volume is 0.

Pent

eXtorian

unread,
Dec 20, 2014, 6:41:25 AM12/20/14
to tas...@googlegroups.com
Hi Pent,

I've double checked everything. Is it really true that Silent Mode = Off actually means Vibrate = Off in Lollipop? As that's how I read it in the instructions.

It's the "Silent Mode = off" that's causing the havoc anyway. It doesn't match what you set it to in many examples.

Please try this to see what I'm talking about. Start with all volumes at 7, and Interrupt = all, i.e. a pretty standard default mode for your phone). Then do:
  1. Interrupt = Priority
  2. Notification Volume = 0
  3. Silent Mode = Off
  4. Flash %VOLM %VOLN %VOLR %VOLS %SILENT %INTERRUPT
Expected output: 15 0 7 7 off priority
Actual output: 15 1 1 1 on priority

Given the last thing I did was set Silent to off, I'd have expected %SILENT to be off.

You'll see why I actually need the Silent (i.e. Vibrate) Mode = off towards the end... please bear with me here.

Before that though, here's some more odd behaviour:
  1. Silent Mode = Off
  2. Notification Volume = 0
  3. Flash %VOLM %VOLN %VOLR %VOLS %SILENT %INTERRUPT
Expected: 15 0 0 0 off priority
Actual: 15 0 0 0 vibrate priority
Maybe that's expected if setting the notification volume to 0 turns on vibrate. So moving on...
  1. Interrupt = Priority
  2. Notification Volume = 0
  3. Silent Mode = Off
  4. Flash %VOLM %VOLN %VOLR %VOLS %SILENT %INTERRUPT
Expected: 15 0 0 0 off priority
Actual: 15 1 1 1 vibrate priority
This one is just weird. Nowhere is any volume set to 1 and Silent (Vibrate) was explicitly set to off.

The endgame I want is:
  • Priority = On (so calls from starred callers can get through)
  • Vibrate = Off (so the phone doesn't vibrate for stuff and wake me up)
  • Action: Music Play, Some Sound, Stream = Notification to make NO SOUND (because some apps do this for notifications and this wakes me up in the middle of the night)
So the obvious thing to do is this:
  1. Interrupt = Priority (to silence notifications but allow starred calls)
  2. Silent = Off (to turn off vibrate)
  3. Music Play, Some Sound, Stream = Notification (to simulate annoying app)
  4. Flash %VOLM %VOLN %VOLR %VOLS %SILENT %INTERRUPT
Expected: 15 7 7 7 off priority, no sound plays.
Actual: 15 7 7 7 on priority, a sound plays.
I believe the sound plays because simply specifying the Notification audio stream doesn't actually work in Lollipop. It looks like only true notifications where the sound is supplied as part of a notification works.

So I add actions to turn the volumes down too - it has to be playing on one of the streams right?:
  1. Interrupt = Priority (to silence notifications but allow starred calls)
  2. Silent = Off (to turn off vibrate)
  3. Media Volume = 0
  4. Notification Volume = 0
  5. System Volume = 0
  6. Music Play, Some Sound, Stream = Notification (to simulate annoying app)
  7. Flash %VOLM %VOLN %VOLR %VOLS %SILENT %INTERRUPT
Expected: 0 0 7 0 off priority, no sound plays.
Actual: 0 0 0vibrate priority, no sound plays.
So I'm nearly there, but I get vibrations occasionally during the night (not sure what from), but worst of all the phone doesn't make a sound when starred callers call. Why is the ringer volume 0??

So I try to fix that by moving Action 2 (Silent = Off) further down...
  1. Interrupt = Priority (to silence notifications but allow starred calls)
  2. Media Volume = 0
  3. Notification Volume = 0
  4. System Volume = 0
  5. Silent = Off (to turn off vibrate)
  6. Music Play, Some Sound, Stream = Notification (to simulate annoying app)
  7. Flash %VOLM %VOLN %VOLR %VOLS %SILENT %INTERRUPT
Expected: 0 0 7 0 off priority, no sound plays.
Actual: 0 1 1 1 on priority, sound plays quietly.

Again - just totally weird. Ringer volume should be 7 as that isn't changed anywhere. Notification and System volumes were explicitly set to 0, but are 1. Silent Mode is explicitly set to off, but is actually on.

Pent

unread,
Dec 20, 2014, 8:09:42 AM12/20/14
to tas...@googlegroups.com

I've double checked everything. Is it really true that Silent Mode = Off actually means Vibrate = Off in Lollipop?

Yes.
 
  1. Interrupt = Priority
  2. Notification Volume = 0
  3. Silent Mode = Off
  4. Flash %VOLM %VOLN %VOLR %VOLS %SILENT %INTERRUPT
Expected output: 15 0 7 7 off priority
Actual output: 15 1 1 1 on priority

i.e. Media volume was unaffected, which is not what you previously wrote and was
all I was contesting.

I'm aware Android is linking volume with mode sometimes.

Given the last thing I did was set Silent to off, I'd have expected %SILENT to be off.

No, for compatibility with pre-Lollipop profiles, %SILENT returns 'on' if interrupt mode
is priority (and not in vibrate mode).

It's described in the %SILENT and Silent Mode help texts.

When creating new stuff in Lollipop, you should just be testing silent for 'vibrate'
and treating any other value as 'not vibrate'.

Pent

Pent

unread,
Dec 20, 2014, 8:11:52 AM12/20/14
to tas...@googlegroups.com


When creating new stuff in Lollipop, you should just be testing silent for 'vibrate'
and treating any other value as 'not vibrate'.

I've just improved the help text for %SILENT to reflect this (but it won't update till
next Tasker version)

Pent

eXtorian

unread,
Dec 20, 2014, 3:24:34 PM12/20/14
to tas...@googlegroups.com
On Saturday, December 20, 2014 1:09:42 PM UTC, Pent wrote:

i.e. Media volume was unaffected, which is not what you previously wrote and was
all I was contesting.

My bad... I think I was confusing Media Volume with Ring Volume. Sorry... not had much sleep lately because my phone keeps waking me up :D
 
When creating new stuff in Lollipop, you should just be testing silent for 'vibrate'
and treating any other value as 'not vibrate'.

 Aha! OK, that clears things up. Thanks.
Message has been deleted

President Bartlett

unread,
Aug 27, 2015, 2:01:51 AM8/27/15
to Tasker, sito...@gmail.com
I recently upgraded to lollipop on my S6.

I cant use tasker to automatically turn on the do not disturb mode via a time activate profile. I can do it manually ( by pressing the play triangle inside the profile). 

I can also do it manually by pressing a widget that calls the task.

I read elsewhere, maybe here, that tasker could not turn off "do not disturb" mode. I cant get tasker to automatically enter or leave do not disturb mode. 

is it working for anyone else? Or do i need to do a factory reset?

Adam Greatrix

unread,
Aug 27, 2015, 5:10:47 AM8/27/15
to tas...@googlegroups.com, sito...@gmail.com

It's working fine for me on my S6.

To turn Do Not Disturb on I'm just setting Interrupt Mode in Tasker to Priority (or None).

To turn DND back off I just set Interrupt Mode to All. Although, I just noticed in that Task that I also set Silent Mode off, but I'm pretty sure that's a relic from before I got Lollipop on my previous phone.

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/4ClJf95kRpE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

President Bartlett

unread,
Aug 27, 2015, 8:50:41 PM8/27/15
to Tasker, sito...@gmail.com
Thanks, really appreciate your reply.

When you say it's working, do you have it happen automatically at a specific time, or do you press a widget to activate DND mode? 

I can press a widget, but if I activate it via a time within tasker, it does not work. 

Adam Greatrix

unread,
Sep 8, 2015, 3:54:25 AM9/8/15
to tas...@googlegroups.com

I have it activating via a time + on charge context, so that it activates when I plug my phone in at night when I go to sleep.

My suggestion would be to make your time based context run a different task that makes a noise or flashes up a toast message or notification. That way you can see if it's a problem with the time based context or the task. It sounds like it's the context that's the problem.

Also remember by default tasker reverts many settings on exit. So if your time context doesn't have an end time it may be ending immediately and reverting the settings. To prevent this, add your task to both the entry and exit tasks.

--
Adam

Reply all
Reply to author
Forward
0 new messages