Skip to content

Commit bf19dc0

Browse files
committed
fix: wait for android app launch completion
1 parent 4dcbf9b commit bf19dc0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/platforms/android/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export async function openAndroidApp(
206206
if (activity) {
207207
throw new AppError('INVALID_ARGS', 'Activity override requires a package name, not an intent');
208208
}
209-
await runCmd('adb', adbArgs(device, ['shell', 'am', 'start', '-a', resolved.value]));
209+
await runCmd('adb', adbArgs(device, ['shell', 'am', 'start', '-W', '-a', resolved.value]));
210210
return;
211211
}
212212
if (activity) {
@@ -219,6 +219,7 @@ export async function openAndroidApp(
219219
'shell',
220220
'am',
221221
'start',
222+
'-W',
222223
'-a',
223224
'android.intent.action.MAIN',
224225
'-c',
@@ -238,6 +239,7 @@ export async function openAndroidApp(
238239
'shell',
239240
'am',
240241
'start',
242+
'-W',
241243
'-a',
242244
'android.intent.action.MAIN',
243245
'-c',
@@ -258,6 +260,7 @@ export async function openAndroidApp(
258260
'shell',
259261
'am',
260262
'start',
263+
'-W',
261264
'-a',
262265
'android.intent.action.MAIN',
263266
'-c',

0 commit comments

Comments
 (0)