Notification drawer confuses App-Task-Started trigger

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
Robrt
Posts: 3
Joined: 02 Nov 2015 16:24

Notification drawer confuses App-Task-Started trigger

Post by Robrt » 27 Feb 2016 16:40

Hello,

I created a small and simple flow that turns off mobile data connection whenever I run the Youtube app. (I used 'App Task Started' trigger for detection)

In the next step of that flow, it shows me an interactive notification (confirm to use mobile data or turn on WiFi instead).

And thats the point, where the problem occurs: To take my choice I pull down the notification, but the notification drawer closes instantly before I can press a button.
Also the icon disappears from the status bar and then the notification shows up again.

I guess that this is caused by the way the trigger works, but I have no idea how to solve it.
A 'Stop Flow' action at the end didn't help. And the interactive notification (only this one) appears in notification ticker style, even though the pop up notification mode is turned on in the system.

Does anybody know how to keep the notification drawer displayed?

Thanks in advance :)

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

Re: Notification drawer confuses App-Task-Started trigger

Post by Martin » 27 Feb 2016 20:28

Hi,

Pulling down the notification drawer probably executes a flow that uses a trigger App Task Ended which somehow causes the notification drawer to close. As soon as the notification drawer closes, app task started is executed again since youtube is the foreground app again.
You could add a condition to the flow with the App Task Ended-trigger when the foreground app is com.android.systemui. The flow with the trigger App Task Started probably also requires such a condition.

Regards,
Martin

Post Reply