High Volume Warning - Another option

Share and discuss your flows and ideas with other users.

Moderator: Martin

Trent Bates
Posts: 8
Joined: 07 Oct 2017 19:41

High Volume Warning - Another option

Post by Trent Bates » 07 Oct 2017 20:49

Hi all,

First post here so bear with me! :)

I've been using AutoMagic for a couple of months. I had previously been a Llama user for about 4 years. I'm really enjoying AutoMagic!

I've looked into the handful of posts about dealing with the High Volume Warning that we get with headphones, bluetooth, etc. and have happened across a very specific method that doesn't appear to be fully described here. The idea has been presented, but it seems the details have not been posted that I can find.
I have tried some of the previous ideas within my car flow with varying success (sometimes it would work, other times it didn't), but it didn't account for other situations. This new flow seems to work nicely for me. You might not have the same luck as I have with it. I'm running it on an unrooted Samsung Galaxy S4 with v5.01.
flow__Volume_Warning_Override_20171007_161520.xml
(2.18 KiB) Downloaded 678 times
20171007_163317.png
Flow view
20171007_163317.png (67.3 KiB) Viewed 14421 times
20171007_163439.png
Trigger view
20171007_163439.png (168.54 KiB) Viewed 14421 times
This might be obvious to many of you, but for new people like me, it wasn't. :) I arrived at the proper entries by opening the UI Event trigger screen, going out to a media player and playing something, then turning up the volume (after a fresh reboot) with headphones plugged in to get the warning window. Once that occurred, I came back to the UI Event screen and clicked on "RECENT EVENTS" and selected the correct event.
Hopefully, this flow will help someone. :)

[Edited to add:] I found that I did not need a delay of any sort for the "click("OK")" portion.

Good luck! Sorry for the huge images!! I hope they are smaller when posted!
--Trent

sallyslak
Posts: 4
Joined: 29 Nov 2017 12:35

Re: High Volume Warning - Another option

Post by sallyslak » 30 Nov 2017 06:17

I've been meaning to say thanks for this for some time! There are so many complicated solutions out there, usually requiring multiple apps and more skill than I possess, so this was perfect. Thanks!

Trent Bates
Posts: 8
Joined: 07 Oct 2017 19:41

Re: High Volume Warning - Another option

Post by Trent Bates » 30 Nov 2017 15:17

Thanks a bunch! ;)

To all,
I'm hoping that the new restrictions that Google is putting on the Accessibility Service won't mess things up for future users! In this flow, "UI Event" will probably be affected. See viewtopic.php?f=2&t=7079 for more info.

syndromtr
Posts: 31
Joined: 01 Feb 2013 13:28

Re: High Volume Warning - Another option

Post by syndromtr » 29 Dec 2017 07:39

there's another way i guess, seems working after 2 days of testing.
please comment if it has issues...

Trigger : Automagic Startup

Action : Sleep - 30s

Action : Set System Setting :
Global
audio_safe_volume_state
2

it needs "Set System Setting" permissions. works on non-root. normally, above value is 3 by default and after a static time of music/media play, it displays naggy high volume warning. with value 2, never!

EDIT: this is for startup. or you can automatically set this value to 2 with periodic timer inexact (after 1 hour is ok)

Trent Bates
Posts: 8
Joined: 07 Oct 2017 19:41

Re: High Volume Warning - Another option

Post by Trent Bates » 29 Dec 2017 14:40

Great info! :)

I will have to try that method as well. I remember seeing that option, but did not go that far into it.

syndromtr
Posts: 31
Joined: 01 Feb 2013 13:28

Re: High Volume Warning - Another option

Post by syndromtr » 29 Dec 2017 15:41

if above doesn't work. another way:
quoted from XDA:

"This doesn't work because there is another setting that overrides "audio_safe_volume_state" and that is "unsafe_volume_music_active_ms"in the secure settings. This value counts up in ms and once it reaches 72000000ms (20 hours) it will reset the volume state. If you are listening to music during the time this happens it will drop the volume below the safe threshold and require you to again bypass the warning. You can reset the "unsafe_volume_music_active_ms" value using the same guide above before it reaches 20 hours but it will not take effect until you reboot your phone."

so, a periodic trigger with

Action : Set System Setting :

Secure
unsafe_volume_music_active_ms
0

should do the trick.

Trent Bates
Posts: 8
Joined: 07 Oct 2017 19:41

Re: High Volume Warning - Another option

Post by Trent Bates » 31 Dec 2017 21:31

Cool!

patrick2point2
Posts: 4
Joined: 10 Dec 2015 17:09

Re: High Volume Warning - Another option

Post by patrick2point2 » 10 Jan 2018 11:15

syndromtr wrote:if above doesn't work. another way:
quoted from XDA:

"This doesn't work because there is another setting that overrides "audio_safe_volume_state" and that is "unsafe_volume_music_active_ms"in the secure settings. This value counts up in ms and once it reaches 72000000ms (20 hours) it will reset the volume state. If you are listening to music during the time this happens it will drop the volume below the safe threshold and require you to again bypass the warning. You can reset the "unsafe_volume_music_active_ms" value using the same guide above before it reaches 20 hours but it will not take effect until you reboot your phone."

so, a periodic trigger with

Action : Set System Setting :

Secure
unsafe_volume_music_active_ms
0

should do the trick.
Can you link your flow thanks.

cjt7777
Posts: 19
Joined: 09 Aug 2016 12:50

Re: High Volume Warning - Another option

Post by cjt7777 » 17 Jan 2018 14:22

This is extremely helpful, many thanks!

sallyslak
Posts: 4
Joined: 29 Nov 2017 12:35

Re: High Volume Warning - Another option

Post by sallyslak » 25 Aug 2018 14:13

Hi - I'm trying to grant the write-secure-settings permission to Automagic but I don't know what the package name should be - eg.
adb shell pm grant com.automagic android.permission.WRITE_SECURE_SETTINGS

Can anyone help? Thanks in advance.

Oh wait - found it - if anyone else needs it it's ch.gridvision.ppam.androidautomagic

Post Reply