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 ofinputs, 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.
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
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.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
One Result per phone, in the order of
phoneIds. With observe, each successful result also has:ok: true means the gesture was performed on that phone.