Long press
long_pressLong-press an Android screen at specified coordinates, using pixel or percentage positions for reliable UI automation.
Instructions
Long-press the screen at coordinates. Instead of pixels you can pass screen percentages (0-1): safer when estimating positions from a screenshot image.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "long_press"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X in device pixels | |
| y | No | Y in device pixels | |
| xPct | No | X as fraction of screen width (0-1) | |
| yPct | No | Y as fraction of screen height (0-1) | |
| serial | No | Device serial (defaults to session or the only device) | |
| durationMs | No | Press duration (default 1000ms — launchers ignore shorter holds) |