Wait until an application becomes the foreground app?

Post your questions and help other users.

Moderator: Martin

Post Reply
highend
Posts: 4
Joined: 19 Sep 2013 19:57

Wait until an application becomes the foreground app?

Post by highend » 19 Sep 2013 20:10

Hi,

I'd like to automate the start of two applications.
The first one is "Blitzer.de PLUS" and the second one "iGO".

Ofc there is a simple way by starting Blitzer.de and then using an Expression like "sleep(7500)" (or pause, etc.) but
I'd like to start iGO when the UI of Blitzer.de becomes visible after starting. The startup time of Blitzer.de varies a bit...

Why is this important? If I don't start iGo a few seconds after Blitzer.de, Blitzer.de will still be in the foreground and I have to swipe down to select iGO again.
I want to avoid this ;)

So, is there any trigger kind of trigger that could be used to achieve this?

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: Wait until an application becomes the foreground app?

Post by kintrupf » 20 Sep 2013 07:53

highend wrote:Hi,
So, is there any trigger kind of trigger that could be used to achieve this?
This might help you: http://automagic4android.com/flow.php?i ... 16fa217024

After starting Blitzer.de PLUS use a loop with a 1 second sleep to check when condition "app task running" and "index == 0" becomes true, the start the other app.
Abort after 20 cycles if condition is not met to avoid an infinite loop.

Post Reply