Endpoint

Overview

Types text into whatever field currently has focus on the phone, as if entered on the keyboard. Tap a text field first to focus it. If nothing is focused, the text goes nowhere and the request still succeeds. By default the text is entered at the phone’s normal speed, which is close to instant. Set duration to spread the typing out over time instead. On iPhone, ASCII characters are entered as key presses. Runs of non-ASCII text, including emoji, are pasted through the clipboard. This replaces the clipboard contents, may trigger iOS’s paste-permission prompt, and does not type those characters one by one over duration. The request returns after all of the text has been entered. Requires an active session on each phone. Platforms: Android, iPhone.

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.
string
required
The text to type. Up to 4096 characters. Any Unicode text is accepted, including emoji. A newline (\n) presses Enter.
number
How long typing the whole text should take, in milliseconds. The characters are spaced evenly across it. At most 60000. Leave it out to type at the phone’s normal speed.
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 text was typed on that phone.