# Interact touch

A decision block that simulate a touchscreen gesture.

The fiber will pause until the gesture has been fully simulated, or the gesture was cancelled.

The NO path is executed if the gesture failed to be dispatched, or was cancelled/interrupted.

Only use this block as a last resort if there’s no other way of performing the desired automation.

Use the App start or App in foreground block to ensure that the correct activity is shown on screen. A delay between sequential interactions may be needed to ensure the UI has been fully loaded and redrawn.

Depending on gesture the input arguments have different purpose:

- Click, Long click, Double click: (X0,Y0) are used as click location.
- Swipe: (X0,Y0) are used as start, and (X1,Y1) as end of swipe, with pointer moving at speed, default is 1000 dip/s.

### Record gesture

Use the the floating record window to help measure screen locations. For now only swipes can be recorded, but its start and end locations can still be used for the other types of gestures. To show the touch/pointer location while its being performed, e.g. for testing and measuring, enable the Pointer location option in system Developer settings.

On Android 11+ the record gesture window is hidden on system Settings unless the Allow screen overlays on settings option is enable in system Developer settings.

Note! This feature isn’t officially supported until Android 7, requires the privileged service on lower versions, may not work on all devices.

## Input arguments

- Action — touchscreen gesture to simulate, default Click.
- Screen X0 — first horizontal screen location, in percent from left edge.
- Screen Y0 — first vertical screen location, in percent from top edge.
- Screen X1 — second horizontal screen location, in percent from left edge.
- Screen Y1 — second vertical screen location, in percent from top edge.
- Pointer speed — pointer speed, in DIP per second.
- Display id — id of the display to gesture on, see Display query block, default is id of the primary display. (Android 11+)