MCPcopy Create free account
hub / github.com/callstack/agent-device / swipeAndroid

Function swipeAndroid

src/platforms/android/input-actions.ts:22–40  ·  view source on GitHub ↗
(
  device: DeviceInfo,
  x1: number,
  y1: number,
  x2: number,
  y2: number,
  durationMs = 250,
)

Source from the content-addressed store, hash-verified

20}
21
22export async function swipeAndroid(
23 device: DeviceInfo,
24 x1: number,
25 y1: number,
26 x2: number,
27 y2: number,
28 durationMs = 250,
29): Promise<void> {
30 await runAndroidAdb(device, [
31 'shell',
32 'input',
33 'swipe',
34 String(x1),
35 String(y1),
36 String(x2),
37 String(y2),
38 String(durationMs),
39 ]);
40}
41
42export async function backAndroid(device: DeviceInfo): Promise<void> {
43 await runAndroidAdb(device, ['shell', 'input', 'keyevent', '4']);

Callers 2

swipeGestureAndroidFunction · 0.90
index.test.tsFile · 0.90

Calls 1

runAndroidAdbFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…