From dbe04660b8369fc333c0acf291f7740154a9dcd3 Mon Sep 17 00:00:00 2001 From: Mike Grabowski Date: Mon, 21 Nov 2016 10:50:56 -0800 Subject: [PATCH 1/2] Add ability to specify mainActivity --- local-cli/runAndroid/runAndroid.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/local-cli/runAndroid/runAndroid.js b/local-cli/runAndroid/runAndroid.js index b3a7b48d61e4..5da78ceb853d 100644 --- a/local-cli/runAndroid/runAndroid.js +++ b/local-cli/runAndroid/runAndroid.js @@ -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(' ')})...` @@ -251,5 +251,9 @@ module.exports = { default: 'Debug' }, { command: '--variant [string]', + }, { + command: '--main-activity [string]', + description: 'Name of the activity to start', + default: 'MainActivity' }], }; From c71d175f940d71e5330dbb88644fd03590922bf7 Mon Sep 17 00:00:00 2001 From: Mike Grabowski Date: Thu, 5 Jan 2017 17:05:08 +0100 Subject: [PATCH 2/2] One more fix --- local-cli/runAndroid/runAndroid.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/local-cli/runAndroid/runAndroid.js b/local-cli/runAndroid/runAndroid.js index 655aff43e885..feffe5f10f5e 100644 --- a/local-cli/runAndroid/runAndroid.js +++ b/local-cli/runAndroid/runAndroid.js @@ -283,14 +283,12 @@ module.exports = { }, { command: '--variant [string]', }, { -<<<<<<< HEAD command: '--main-activity [string]', description: 'Name of the activity to start', - default: 'MainActivity' -======= + default: 'MainActivity', + }, { command: '--deviceId [string]', description: 'builds your app and starts it on a specific device/simulator with the ' + 'given device id (listed by running "adb devices" on the command line).', ->>>>>>> master }], };