8

Listener for new modes presets

Hi,
The latest Android update introduced Modes. They allow us to predefine Do Not Disturb settings.

Unfortunately, they have limited capabilities at the moment, and it would be great to enhance them with Tasker by adding an action that executes upon activating such a mode.

Tasker could detect whether a mode has been activated and which one (preferably by name). Then, we could use a profile to listen for its activation and, for example, use a Tasker action to turn on vibration.

4 replies

It's confusing to follow as they keep changing the name of what the feature is, but basically it appears to be a change/improvement to what was previously known as "priority modes' in Android 15. Except it doesn't appear to be called that anymore, hence the confusion.

It was first discovered and later first functional in the 16 beta builds, but I guess they have backported it to 15 as well.

https://www.androidauthority.com/android-16-priority-modes-3489163/

What makes it even more confusing is that in 15 Samsung has implemented it slightly differently and use different terms to refer to what is basically the same feature compared to how Google has with its Pixel devices. Hopefully they will still use the same API calls, but I guess time will tell when they eventually catch up.

What I've been most interested in is what is the upgraded/improved "Bedtime Mode" (which appears to still be called/referenced as zen mode), as supposedly with it enabled it will do some basic sleep tracking with the information being tied/linked to Digital Wellbeing. Again because Samsung have implemented their version of Digital Wellbeing slightly differently, trying to wrap my head around how all of this is supposed to work together keeps throwing me through several loops.

However if you go back to 14 there already existed a "Bedtime Mode" on Samsung devices and watches that did some of the same basic things. I'm still not sure if Google is just copying what Samsung already did, or if it is all entirely different. Like I said, confusing. 🫨

Wait a minute, what's Tasker doing there in the create custom modes menu. 😄

That's used for the Set Device Effects action :)

A

@João Dias Will you add the ability to listen for changes to these modes?

Maybe in the future. Not sure yet, sorry!

M

Literally found this after trying to find out why zen_mode_config_etag doesn't work for hours. I don't even know this website existed before, but yes please. I would love to be able to react to certain modes (since the built in ones are kinda shit). Funnily enough, tasker is suggested but I thin it's a side effect of how tasker applied device effects like grey scale. If you try to select it, you get a message reading to "configure with 'device effects' action in tasker"

There is also "zen_mode" which is just a simple 1 and 0 toggle, but it appears it needs to be set alongside whatever the config_etag action is. But the value of that is a different string of numbers every time the mode is toggled on or off, Hopefully someone smarter then me can figure out what the correlation is. 

Hi. Do you know if there's an API to listen for changes in those modes?

A

Unfortunately, no. I tried to see if I could change it using custom_settings, and while it did find the variable 'zen_mode_config_etag' every time I made a change, its values changed periodically for the same modes.
Perhaps Android sends some global event?

S

I think 'zen_mode_config_etag' is related to the ETA ending of the mode when a time is set. I found the 2nd value is negative when I set 'untill I revoke'.

Hhmm ZenMode has existed forever now... 😅 The OP mentioned that it was a new feature introduced in the latest update?

A

They changed it in last update. Now we can create own modes.

Before that there was only one DND.