Files
callstack__agent-device/android-multitouch-helper/README.md
Michał Pierzchała 7ab9998645 fix: stabilize Maestro post-gesture snapshots (#681)
* fix: stabilize maestro post-gesture snapshots

* fix: harden maestro ci diagnostics and ios prepare

* fix: preserve android freshness baseline for optimized taps

* fix: close ios runner host after sessionless commands

* fix: require tracked app for ios snapshots

* fix: keep in-page swipes on visible content

* test: align lock policy probes with ios snapshot guard

* fix: compose post-gesture snapshots with android freshness

* refactor: clarify post-action snapshot policies

* fix: avoid redundant swipe stabilization flag

* fix: route android swipes through gesture helper

* test: cover android swipe helper fallback
2026-06-04 14:44:33 -07:00

42 lines
1.4 KiB
Markdown

# Android MultiTouch Helper
Small instrumentation APK used to inject Android touch gestures through
`UiAutomation.injectInputEvent`. The helper accepts a compact base64 JSON payload so local ADB,
remote ADB tunnels, and remote providers that allow `adb install -t` plus `am instrument` can use
the same contract.
The helper is separate from `android-snapshot-helper` because the payload and output protocol are
gesture-specific. The install/version/cache lifecycle should stay aligned with the snapshot helper.
## Build
```sh
VERSION="$(node -p 'require("./package.json").version')"
sh ./scripts/build-android-multitouch-helper.sh "$VERSION" .tmp/android-multitouch-helper
```
## Run
```sh
PAYLOAD="$(printf '%s' '{"kind":"transform","x":672,"y":1500,"dx":80,"dy":-40,"scale":1.8,"degrees":35,"durationMs":700}' | base64)"
adb install -r -t ".tmp/android-multitouch-helper/agent-device-android-multitouch-helper-$VERSION.apk"
adb shell am instrument -w \
-e payloadBase64 "$PAYLOAD" \
com.callstack.agentdevice.multitouchhelper/.MultiTouchInstrumentation
```
## Output Contract
The APK emits instrumentation result records using
`agentDeviceProtocol=android-multitouch-helper-v1`.
Successful results include:
- `ok=true`
- `helperApiVersion=1`
- `kind` (`swipe`, `pinch`, `rotate`, or `transform`)
- `injectedEvents`
- `elapsedMs`
Failures return `ok=false`, `errorType`, and `message`.