v2.6.0
pinch — real two-finger multi-touch (Android emulator)
A new pinch tool that sends two genuine kernel touch contacts through the Android emulator's gRPC bridge using the Linux multi-touch protocol. Because it works below the app rather than through React Native, it zooms maps, image galleries, WebViews, and native views alike.
direction: "out"zooms in,"in"zooms outx/yset the focal point in the shared screenshot-pixel space — pass coordinates straight fromget_screen_stateor a screenshot, no conversionscaleis the finger-separation ratio; ratios too large for one gesture chain automaticallyanglepicks the finger axis;spanshrinks the gesture's footprint without changing the zoom ratio- Returns
verification.meaningfuljust likeswipe
Android emulators only — iOS is in progress. Physical Android devices have no such bridge, and iOS needs a multi-touch HID helper that no released idb ships. Both return an explicit error rather than a partial result. pinch never fakes a zoom by calling app code: a success means real fingers moved.
Added with zero new dependencies — node:http2 plus a hand-written protobuf encoder whose output is byte-identical to the official gRPC serializer.
If direction: "in" appears to do nothing
Lower span (try 0.5). A pinch-in starts with the fingers far apart, so at the default span they land at the screen extremes, where a top bar or bottom sheet can take the gesture before the zoomable surface sees it.
Fixed
swipedirection shorthand was off-target.captureScreenshotreturns device dimensions from before the downscale applied to fit the API limit, but the shorthand treated them as screenshot pixels and scaled them again. On a 1080x2424 emulator,swipe({direction:"up"})reported swiping from (540, 1612) while actually swiping from (654, 1954) — off-centre horizontally, lower than intended, withdistanceinflated by the same factor. Masked whenverify:false, and on devices small enough to need no downscale.