Wait for user interaction

Post your questions and help other users.

Moderator: Martin

Post Reply
TheUnknownBuffalo
Posts: 38
Joined: 09 Aug 2017 07:19

Wait for user interaction

Post by TheUnknownBuffalo » 10 May 2018 08:13

I have a workflow that autostarts, and I want to add some kind of button to be displayed to wait for user interaction, and the workflow is paused until the user hits go? an example:

workflow automatically starts at x time
part of the workflow is executed
workflow displays button 'GO' and pauses until the button is tapped
once user taps 'GO' the workflow carries on

User avatar
digitalstone
Posts: 342
Joined: 21 Oct 2017 12:36
Location: The Netherlands

Re: Wait for user interaction

Post by digitalstone » 12 May 2018 00:32

A button, you mean like a widget?

What i would do is:
- Make that widget (or whatever it is you want to start this flow with) and setup an 'action' inside to execute your flow (this very flow that you're talking about).
- The first flow element after the trigger element should be an "Expression" condition.
- The expression should be:

Code: Select all

trigger=="Automagic Startup"
From here you can branch off from:
- True, when the flow is actually is self-triggered.
- False, when the flow is triggered by anything else.
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Wait for user interaction

Post by Desmanto » 14 May 2018 17:13

Maybe just use Condition - Confirmation Dialog? There is a yes no button you can put there, true go to your main flow's branch.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply