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

Function openAndroidDeepLink

src/platforms/android/app-lifecycle.ts:355–379  ·  view source on GitHub ↗
(
  device: DeviceInfo,
  target: string,
  options: OpenAndroidAppOptions,
)

Source from the content-addressed store, hash-verified

353}
354
355async function openAndroidDeepLink(
356 device: DeviceInfo,
357 target: string,
358 options: OpenAndroidAppOptions,
359): Promise<void> {
360 if (options.activity) {
361 throw new AppError(
362 'INVALID_ARGS',
363 'Activity override is not supported when opening a deep link URL',
364 );
365 }
366 await ensureAndroidLocalhostReverse(device, target);
367 await runAndroidAdb(device, [
368 'shell',
369 'am',
370 'start',
371 '-W',
372 '-a',
373 'android.intent.action.VIEW',
374 '-d',
375 target,
376 ...androidDeepLinkPackageArgs(options.appBundleId),
377 ...androidLaunchArgs(options),
378 ]);
379}
380
381async function openAndroidAppBoundDeepLink(
382 device: DeviceInfo,

Callers 1

openAndroidAppFunction · 0.85

Calls 4

runAndroidAdbFunction · 0.90
androidLaunchArgsFunction · 0.85

Tested by

no test coverage detected