Long press on the device screen
android.input.longPressPerform a long press action on Android devices by specifying coordinates and duration, enabling UI automation through scrcpy protocol or ADB fallback.
Instructions
Performs a long press at coordinates (x,y) for specified duration. Uses fast scrcpy control protocol when stream is active, otherwise falls back to adb shell input.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"serial": "<serial>",
"x": "<x>",
"y": "<y>"
},
"name": "android.input.longPress"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | Yes | ||
| x | Yes | ||
| y | Yes | ||
| durationMs | No |