Page 1 of 1

Notification drawer confuses App-Task-Started trigger

Posted: 27 Feb 2016 16:40
by Robrt
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 :)

Re: Notification drawer confuses App-Task-Started trigger

Posted: 27 Feb 2016 20:28
by Martin
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