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

Function installAndroidApp

src/platforms/android/app-lifecycle.ts:863–894  ·  view source on GitHub ↗
(
  device: DeviceInfo,
  appPath: string,
)

Source from the content-addressed store, hash-verified

861}
862
863export async function installAndroidApp(
864 device: DeviceInfo,
865 appPath: string,
866): Promise<{
867 archivePath?: string;
868 installablePath: string;
869 packageName?: string;
870 appName?: string;
871 launchTarget?: string;
872}> {
873 if (!device.booted) {
874 await waitForAndroidBoot(device.id);
875 }
876 const prepared = await prepareAndroidInstallArtifact({ kind: 'path', path: appPath });
877 try {
878 const packageName = await installAndroidInstallablePathAndResolvePackageName(
879 device,
880 prepared.installablePath,
881 prepared.packageName,
882 );
883 const appName = packageName ? inferAndroidAppName(packageName) : undefined;
884 return {
885 archivePath: prepared.archivePath,
886 installablePath: prepared.installablePath,
887 packageName,
888 appName,
889 launchTarget: packageName,
890 };
891 } finally {
892 await prepared.cleanup();
893 }
894}
895
896export async function reinstallAndroidApp(
897 device: DeviceInfo,

Callers 2

index.test.tsFile · 0.90
session-deploy.tsFile · 0.85

Tested by

no test coverage detected