Skip to content

Commit

Permalink
fix: add missing arguments to adb shell (#1916)
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonrybczak committed Apr 17, 2023
1 parent 8d8d638 commit 6e9a441
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,19 @@ function tryLaunchAppOnDevice(
: [packageName, args.mainActivity].filter(Boolean).join('.');

try {
// Here we're using the same flags as Android Studio to launch the app
const adbArgs = [
'shell',
'am',
'start',
'-n',
`${packageNameWithSuffix}/${activityToLaunch}`,
'-a',
'android.intent.action.MAIN',
'-c',
'android.intent.category.LAUNCHER',
];

if (device) {
adbArgs.unshift('-s', device);
logger.info(`Starting the app on "${device}"...`);
Expand Down

0 comments on commit 6e9a441

Please sign in to comment.