Skip to content

Commit

Permalink
Add ability to specify main Activity in run-android
Browse files Browse the repository at this point in the history
Summary:
Follow up to #8190

Tested with custom parameter as well as w/o (using default value). All worked well.

Differential Revision: D4220565

Pulled By: mkonicek

fbshipit-source-id: e8a98542d3ff96d60ff6045b328f5b464f78ee74
  • Loading branch information
grabbou authored and Facebook Github Bot committed Nov 23, 2016
1 parent 5db7484 commit 9fb520e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion local-cli/runAndroid/runAndroid.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function buildAndRun(args) {
devices.forEach((device) => {

const adbArgs =
['-s', device, 'shell', 'am', 'start', '-n', packageName + '/.MainActivity'];
['-s', device, 'shell', 'am', 'start', '-n', packageName + '/.' + args.mainActivity];

console.log(chalk.bold(
`Starting the app on ${device} (${adbPath} ${adbArgs.join(' ')})...`
Expand Down Expand Up @@ -251,5 +251,9 @@ module.exports = {
default: 'Debug'
}, {
command: '--variant [string]',
}, {
command: '--main-activity [string]',
description: 'Name of the activity to start',
default: 'MainActivity'
}],
};

0 comments on commit 9fb520e

Please sign in to comment.