Clear Android High Volume Warning

General discussions about Automagic and automation in general

Moderator: Martin

beefy_clyro
Posts: 7
Joined: 07 Dec 2015 10:16

Clear Android High Volume Warning

Post by beefy_clyro » 07 Dec 2015 10:22

Hi

I have a flow setup that when I get in my car and it connects on bluetooth that it launches Spotify and turns the media volume to 15. Upon trying to turn the media volume up, there is a 'high volume can damage' warning and you have to hit ok before you can turn the media volume up. Is there a way to simulate clearing that message?

Thanks,
Keith

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Clear Android High Volume Warning

Post by Martin » 07 Dec 2015 19:38

Hi,

You can try to simulate clicking the OK-button with action Control UI and a script like click("OK");.
You probably have to add an action Sleep: 1s after changing the volume so Automagic waits one second until the system shows the warning dialog.

On a rooted device you could check if action Set System Setting could be used to avoid the warning. In the global section there's a setting with name audio_safe_volume_state that sounds promising, however I have not tested if it actually affects the warning dialog.

Regards,
Martin

beefy_clyro
Posts: 7
Joined: 07 Dec 2015 10:16

Re: Clear Android High Volume Warning

Post by beefy_clyro » 22 Dec 2015 00:08

Hi. Thanks for the message unfortunately it doesn't work and I do not have a rooted phone. Could you possibly post a screenshot of how the flow should look so I know I've interpreted it right? Any other ideas if this doesn't work? Thanks

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Clear Android High Volume Warning

Post by Martin » 29 Dec 2015 19:33

Hi,

A flow like this could work (only tested on Android 6):
-action Set Audio Stream Volume: Music to level 14
-action Control UI with following script:

Code: Select all

sleep(1000);
click("OK");
It's crucial that the label of the OK-button is written exactly as it appears on screen. You also have to enable Automagic as an accessibility service. Editing the action 'Control UI' should show a blue label when it's not already enabled.

Regards,
Martin

beefy_clyro
Posts: 7
Joined: 07 Dec 2015 10:16

Re: Clear Android High Volume Warning

Post by beefy_clyro » 29 Dec 2015 23:45

Hi Martin,

Thanks again for your reply. I had similar but had time set to 1 and not 1000 so maybe that's why it hasn't worked. Does this look like what you mean? I set another set audio as after you press ok you then have to adjust volume again.

Thanks,
Keith
Attachments
Screenshot_2015-12-29-23-42-05.png
Screenshot_2015-12-29-23-42-05.png (152.82 KiB) Viewed 29170 times

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Clear Android High Volume Warning

Post by Martin » 04 Jan 2016 19:52

It probably depends on device and Android version if the last action is necessary or not but it should not hurt to execute the action a second time.
Do you get the warning dialog again when the action is executed a second time?

beefy_clyro
Posts: 7
Joined: 07 Dec 2015 10:16

Re: Clear Android High Volume Warning

Post by beefy_clyro » 04 Jan 2016 22:44

I'm on android 5.1.1 using an s6 edge.

Basically, if manually performing steps, this is what happens ...

Go to increase volume using button and are presented with the warning.
Once you press ok thyme warning disappears but no volume is changed.
You then manually press the buttons again to increase volume.

This is why I actioned the command a second time in my flow.

I have now tested this and afraid it doesn't work.
All I want to do is get in my car, have it connect and play media at Max volume ... It's such a stupid warning imposed daily!

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Clear Android High Volume Warning

Post by Martin » 05 Jan 2016 19:33

Where or how does the flow fail? Does it successfully click on the OK button or stays the warning dialog open? Is the screen on and unlocked when the flow is executed?

beefy_clyro
Posts: 7
Joined: 07 Dec 2015 10:16

Re: Clear Android High Volume Warning

Post by beefy_clyro » 05 Jan 2016 23:12

It performs the connection, opens Spotify and starts to play. I assume.it tried to set volume.but warning prevents it. The screen is locked as phone is usually in my pocket.
Once I take it out,.press hardware button, see message, press ok I can then use the button to manually turn up to full.
I then have a rule that puts volume.to silent once bt disconnects. Again I enter car and this time, because warning has been cleared it can now execute all the way through.
So i think the control ui state to simulate pressing ok does not work.

briney
Posts: 6
Joined: 10 Jul 2013 13:19

Re: Clear Android High Volume Warning

Post by briney » 06 Jan 2016 16:19

I have a flow that seems to work in removing the warning. The flow turns on Poweramp and sets the headphone volume to 15,removing the warning in the process. The flow is a bit rough in that it is not optimised yet but it does work for me. http://automagic4android.com/flow.php?i ... 11b4336526

Post Reply