High Volume Warning

332 views
Skip to first unread message

merly...@gmail.com

unread,
Oct 16, 2015, 12:01:28 PM10/16/15
to Automate
Hello,

I'm trying to make an flow that maxes out BT media volume when connected to car. Everything works, however, I get the the old "Listening at high volume for long periods may damage your hearing." popup window and have to press "OK". Any way to disable/circumvent/auto-click OK for this? Thanks!

Automate developer

unread,
Oct 16, 2015, 2:28:19 PM10/16/15
to Automate, merly...@gmail.com
There's no way to disable it on standard Android, maybe on a rooted device:
http://stackoverflow.com/questions/19179788/disable-sound-safe-level-notification-in-android

Try using the Interact block to tap the OK button.

david....@gmail.com

unread,
Oct 16, 2015, 4:36:14 PM10/16/15
to Automate
You can try the "NoSafeVolumeWarning" Xposed module

merly...@gmail.com

unread,
Oct 16, 2015, 5:30:08 PM10/16/15
to Automate, merly...@gmail.com
Ok I think the interact block will work for me... one last question, it doesn't seem to always come up. How do I test to is "if" the warning box is present?

Automate developer

unread,
Oct 16, 2015, 5:47:54 PM10/16/15
to Automate, merly...@gmail.com
That will be difficult unless the dialog is actually an Activity, which i doubt. Automate doesn't have a trigger for dialogs.
You may be able to use the Interact block with action Check to test if an UI element with the dialog text is present on screen.

merly...@gmail.com

unread,
Oct 16, 2015, 5:53:36 PM10/16/15
to Automate, merly...@gmail.com
Foreground app logger to the rescue (possibly)!

Using the app logger I watched what happened when the window comes up and get:

com.android.systemui
com.android.volume.SecVolumePanel$SafetyWarning

I'm guessing I can use this as a foreground app check after (attempting to) setting volume, UI interact to press OK, then set volume for real.

I think this warning only comes up once after a restart.

merly...@gmail.com

unread,
Oct 16, 2015, 6:57:32 PM10/16/15
to Automate, merly...@gmail.com
This works! However, just use "com.android.systemui" not the *SafetyWarning business

Reply all
Reply to author
Forward
0 new messages