Skip to content

Commit 56984af

Browse files
committed
Only delay ADB intent after an install, not always
1 parent 6c6df34 commit 56984af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interceptors/android/android-adb-interceptor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ export class AndroidAdbInterceptor implements Interceptor {
7474
await this.adbClient.install(options.deviceId, await streamLatestApk(this.config));
7575
}
7676
console.log("App installed successfully");
77+
78+
await delay(200); // Add a little delay, to ensure intent URL is registered before we use it
7779
}
7880

7981
// Now that the app is installed, bring it to the front (avoids issues with starting a
@@ -102,8 +104,6 @@ export class AndroidAdbInterceptor implements Interceptor {
102104
};
103105
const intentData = urlSafeBase64(JSON.stringify(setupParams));
104106

105-
await delay(100); // Add a little delay, to ensure intent URL is registered
106-
107107
// Use ADB to launch the app with the proxy details
108108
await this.adbClient.startActivity(options.deviceId, {
109109
wait: true,

0 commit comments

Comments
 (0)