( device: DeviceInfo, target: string, options: OpenAndroidAppOptions, )
| 353 | } |
| 354 | |
| 355 | async 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 | |
| 381 | async function openAndroidAppBoundDeepLink( |
| 382 | device: DeviceInfo, |
no test coverage detected