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

Function longPressAndroid

src/platforms/android/input-actions.ts:81–97  ·  view source on GitHub ↗
(
  device: DeviceInfo,
  x: number,
  y: number,
  durationMs = 800,
)

Source from the content-addressed store, hash-verified

79}
80
81export async function longPressAndroid(
82 device: DeviceInfo,
83 x: number,
84 y: number,
85 durationMs = 800,
86): Promise<void> {
87 await runAndroidAdb(device, [
88 'shell',
89 'input',
90 'swipe',
91 String(x),
92 String(y),
93 String(x),
94 String(y),
95 String(durationMs),
96 ]);
97}
98
99export async function typeAndroid(device: DeviceInfo, text: string, delayMs = 0): Promise<void> {
100 const providerText = resolveAndroidTextInjector(device);

Callers 1

createAndroidInteractorFunction · 0.90

Calls 1

runAndroidAdbFunction · 0.90

Tested by

no test coverage detected