device_pinch
Simulate two-finger pinch gestures to zoom in or out on Android devices. Specify center coordinates, direction ('in' or 'out'), and duration for precise control.
Instructions
Perform a pinch gesture (two-finger zoom) on the device. Use 'out' to zoom in (fingers spread apart) and 'in' to zoom out (fingers come together). Works on real Android phones (no root needed) via UIAutomation MotionEvent injection.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spread | No | Max distance in logical pixels each finger travels from center (default 200) | |
| centerX | Yes | X coordinate of the pinch center in original screen pixels | |
| centerY | Yes | Y coordinate of the pinch center in original screen pixels | |
| deviceId | Yes | ||
| duration | No | Gesture duration in ms (default 500) | |
| platform | Yes | ||
| direction | Yes | 'out' = zoom in (spread fingers apart), 'in' = zoom out (fingers come together) |