mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
7ab9998645
* 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
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
VERSION="$(node -p 'require("./package.json").version')"
sh ./scripts/build-android-multitouch-helper.sh "$VERSION" .tmp/android-multitouch-helper
Run
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=truehelperApiVersion=1kind(swipe,pinch,rotate, ortransform)injectedEventselapsedMs
Failures return ok=false, errorType, and message.