MCPcopy Index your code
hub / github.com/callstack/agent-device / swipeGestureAndroid

Function swipeGestureAndroid

src/platforms/android/multitouch-helper.ts:118–141  ·  view source on GitHub ↗
(
  device: DeviceInfo,
  options: AndroidSwipeGestureOptions,
)

Source from the content-addressed store, hash-verified

116};
117
118export async function swipeGestureAndroid(
119 device: DeviceInfo,
120 options: AndroidSwipeGestureOptions,
121): Promise<Record<string, unknown> | void> {
122 const providerResult = await runAndroidTouchProviderGesture(device, {
123 kind: 'swipe',
124 ...options,
125 });
126 if (providerResult) return providerResult;
127
128 try {
129 return await runAndroidMultiTouchHelperGestureForDevice(device, { kind: 'swipe', ...options });
130 } catch (error) {
131 emitDiagnostic({
132 level: 'warn',
133 phase: 'android_swipe_helper_fallback',
134 data: {
135 error: normalizeError(error).message,
136 },
137 });
138 await swipeAndroid(device, options.x1, options.y1, options.x2, options.y2, options.durationMs);
139 return { backend: 'adb-input-swipe-fallback' };
140 }
141}
142
143export async function pinchAndroid(
144 device: DeviceInfo,

Callers 2

createAndroidInteractorFunction · 0.90

Calls 5

emitDiagnosticFunction · 0.90
normalizeErrorFunction · 0.90
swipeAndroidFunction · 0.90

Tested by

no test coverage detected