Set Media Volume and automatically click ok when the warning

Post your questions and help other users.

Moderator: Martin

Post Reply
fanello
Posts: 5
Joined: 24 Jul 2015 06:37

Set Media Volume and automatically click ok when the warning

Post by fanello » 24 Jul 2015 06:51

Hi,

I want to set the Media Volme to maximum with automagic, when my car connects via bluetooth.
Unforunately the volume warning messages pops up and I have to say ok, that the media volume is set.

Is there any way to automatically press ok, when the message pops up?

Thanks for your help

Regards
Benny

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

Re: Set Media Volume and automatically click ok when the war

Post by Martin » 24 Jul 2015 11:13

Hi,

You could use action Control UI to click the OK button.
A flow like this could work:
-action Set Audio Volume: ...
-action Sleep: 5s (ensure the dialog is shown, duration can probably be reduced)
-action Control UI: click("OK");

The text passed to the click function has to exactly match the label of the button. You can also use Show Overlay Control in action Control UI to copy the click function with the proper label to the clipboard.

You could also use trigger UI Event to detect when the dialog box is shown but the solution above should be simpler and does not interfere when you are changing the volume manually.

Regards,
Martin

fanello
Posts: 5
Joined: 24 Jul 2015 06:37

Re: Set Media Volume and automatically click ok when the war

Post by fanello » 24 Jul 2015 16:19

Thanks for your help :)

I like the UI Event solution, so I don't have to press ok when the warning pop ups in the futzre :)

How can I find out how the package is called?

Thanks again for your help

Regards
Benny

fanello
Posts: 5
Joined: 24 Jul 2015 06:37

Re: Set Media Volume and automatically click ok when the war

Post by fanello » 24 Jul 2015 16:29

Something is not working properly here.
If I'm in the flow and click execute, the Warning message pops up. If the Flow gets executed automatically, the warning just doesnt pop up. It doesn't matter if the Display is on or off.

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

Re: Set Media Volume and automatically click ok when the war

Post by Martin » 27 Jul 2015 18:27

Hi,

I'm not sure how the device detects the difference between manually executing the flow and not. Are you sure that the flow is automatically executed at all? You could add an action Vibrate to ensure that the flow is executed.

I assume that the Android system UI itself shows the warning popup so you could use package com.android.systemui.
You can also create the trigger with package set to the package you expect and use Notification on Screen: {text} and Vibrate or action Script: log(text); and check the log.

Regards,
Martin

Post Reply