How to "press button to start recording" and "release button to stop recording"?

Hi guys!

I’d like to replicate the same behavior of WhatsApp for voice messages: when the user presses a button and keeps it pressed the voice is recorded.
When the user releases the button the recorder stops.

Does anyone has implemented this feature?

For this you will need a long press action. Maybe plugins like this one can help you.

Maybe the “When condition is true” (set to Everytime) event, with the condition When Button is pressed → Start recording

Then copy it but change it to When Button is pressed is no → Stop recording

Thank you guys!

@tylerboodman I adapted your strategy and it worked pretty well.

For the knowledge of everybody looking for the same solution, here is what I did:

  1. I created a group (it is going to work as a button) and a hidden text (it is going to work as a trigger).

  2. Considering that you can’t set the condition “is pressed” in workflows to trigger the recorder, I put 2 conditions for the text. These conditions will trigger the recorder in workflows.

image

  1. Then I created 2 workflows: one to start recording and another to stop recording. Both are triggered when a condition is changed. In this case the text visibility.

This way when I press the START/STOP button the text is exposed and the recorder starts. When I release the START/STOP button the text is hidden and the recorder stops.

1 Like