Skip to content

Commit

Permalink
Fix package name for main activity when appId set (#1242)
Browse files Browse the repository at this point in the history
* Allow absolute main activity to be set

* lint improvements
  • Loading branch information
grahamsmith authored Sep 4, 2020
1 parent 9bfe424 commit a6cc6c8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ function tryLaunchAppOnDevice(
.filter(Boolean)
.join('.');

const activityToLaunch = args.mainActivity.includes('.')
? args.mainActivity
: [packageName, args.mainActivity].filter(Boolean).join('.');

try {
const adbArgs = [
'shell',
'am',
'start',
'-n',
`${packageNameWithSuffix}/${packageName}.${args.mainActivity}`,
`${packageNameWithSuffix}/${activityToLaunch}`,
];
if (device) {
adbArgs.unshift('-s', device);
Expand Down

0 comments on commit a6cc6c8

Please sign in to comment.