Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit dae8c83

Browse files
Merge pull request #537 from telerik/fatme/show-app-output-by-livesync-command
Show application output from livesync command
2 parents 8621709 + c7e6dc4 commit dae8c83

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

mobile/android/android-application-manager.ts

+13-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ export class AndroidApplicationManager implements Mobile.IDeviceApplicationManag
66
private _installedApplications: string[];
77

88
constructor(private adb: Mobile.IAndroidDebugBridge,
9-
private $staticConfig: Config.IStaticConfig) { }
9+
private identifier: string,
10+
private $staticConfig: Config.IStaticConfig,
11+
private $options: ICommonOptions,
12+
private $logcatHelper: Mobile.ILogcatHelper) { }
1013

1114
public getInstalledApplications(): IFuture<string[]> {
1215
return (() => {
@@ -41,10 +44,15 @@ export class AndroidApplicationManager implements Mobile.IDeviceApplicationManag
4144
}
4245

4346
public startApplication(appIdentifier: string): IFuture<void> {
44-
return this.adb.executeShellCommand(["am", "start",
45-
"-a", "android.intent.action.MAIN",
46-
"-n", `${appIdentifier}/${this.$staticConfig.START_PACKAGE_ACTIVITY_NAME}`,
47-
"-c", "android.intent.category.LAUNCHER"]);
47+
return (() => {
48+
this.adb.executeShellCommand(["am", "start",
49+
"-a", "android.intent.action.MAIN",
50+
"-n", `${appIdentifier}/${this.$staticConfig.START_PACKAGE_ACTIVITY_NAME}`,
51+
"-c", "android.intent.category.LAUNCHER"]).wait();
52+
if (!this.$options.justlaunch) {
53+
this.$logcatHelper.start(this.identifier);
54+
}
55+
}).future<void>()();
4856
}
4957

5058
public stopApplication(appIdentifier: string): IFuture<void> {

0 commit comments

Comments
 (0)