Endpoint

Overview

Performs one touch gesture with a single finger. Taps, long presses, swipes and free-form gestures are all the same request: a list of inputs, carried out in the order you send them. Each input is a position and a time: when the finger is at that position, in milliseconds since it touched down.
  • The finger touches down at the first input’s position at time 0.
  • It reaches each input’s position at that input’s time, moving in a straight line at constant speed from the one before.
  • It lifts at the last input’s time.
So a single input is a press that lasts until its time, and the time of the last input is the length of the whole gesture. The request returns after the finger has lifted. Requires an active session on each phone. Platforms: Android, iPhone.

Common gestures

To hold the finger still partway through a gesture, repeat the same x and y with a later time.
A gesture uses one finger. Multi-finger gestures such as pinch are not available. For touch that follows a person’s finger as it moves, use live touch.

Request Body

string[]
required
The phones to act on.
string
One phone, instead of phoneIds. The answer’s data is then that phone’s result itself, not a list, and a failure on the phone is the request’s ok: false with the phone’s error (at the HTTP status of its code). Give phoneId or phoneIds, not both.
object[]
required
The points of the gesture, in order. Between 1 and 2048 inputs.
object
Look at the screen after the action, in the same answer. The hub takes a frame before the action, does it, waits until the screen settles (two frames about 300 ms apart that look the same, for at most settleMs), and adds screen, effect and, when the action should have changed the screen and did not, warnings to the phone’s result. Costs one look at the screen plus the wait.

Response

boolean
true when the request was carried out. Check each result for how it went on that phone.
Result[]
One Result per phone, in the order of phoneIds. With observe, each successful result also has:
A result with ok: true means the gesture was performed on that phone.