Skip to content

Conversation

@enterline
Copy link

@enterline enterline commented Jul 18, 2016

Allow optional applicationId build parameter. eg:

 react-native run-android --variant=DevEnvDebug --applicationId=com.awesomeproject.devenv

It will then start the app with something like this:

Starting the app on 192.168.59.101:5555 (/Users/wenterline/Library/Android/sdk/platform-tools/adb -s 192.168.59.101:5555 shell am start -n com.awesomeproject.devenv/com.awesomeproject.MainActivity)...

Many times in Android, we have the need to set a different applicationId for different build variants. eg:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.awesomeproject"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    ...
    productFlavors {

        all {
        }

        ProdEnv {
        }

        DevEnv {
            applicationId "com.awesomeproject.devenv"
        }

    }
    ...
}

This should address issue #8308

Test plan (required)

We have been using this modified version of runAndroid for quite some time. I have tested with and without the parameter and builds that have different application ids and builds that do not.

@ghost
Copy link

ghost commented Jul 18, 2016

By analyzing the blame information on this pull request, we identified @burgalon and @jimthedev to be potential reviewers.

@ghost ghost added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Jul 18, 2016
@satya164
Copy link
Contributor

satya164 commented Aug 5, 2016

cc @Kureev

can we not detect it automatically?

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 5, 2016
@ghost
Copy link

ghost commented Aug 17, 2016

It's been a while since the last commit was reviewed and the labels show this pull request needs review. Based on the blame information for the files in this pull request we identified @grabbou as a potential reviewer. Could you take a look please or cc someone with more context?

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 17, 2016
@satya164
Copy link
Contributor

ping @Kureev @grabbou

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 17, 2016
@Kureev
Copy link
Contributor

Kureev commented Aug 21, 2016

Not that familiar with the subj. Is it something very common for every Android developer, @satya164?

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 21, 2016
@satya164
Copy link
Contributor

@Kureev For background,

We currently support specifying build flavors for Android. They are just variants of the same app with some differences and a different application id. But run-android doesn't launch the correct flavor and always run the app with the default application id.

What I'd prefer is to automatically detect the application id and launch it instead of having to specify the application id. It's pretty common to have build flavors for different environments on android.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 21, 2016
@Kureev
Copy link
Contributor

Kureev commented Aug 21, 2016

If there is a way to do it automatically, I'd like to kindly ask @enterline to change current implementation.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 21, 2016
@alenia
Copy link

alenia commented Aug 22, 2016

@Kureev it's possible that #8950 is an attempt to do it automatically? I haven't actually checked though.

@enterline
Copy link
Author

@alenia, @Kureev I just tested #8950 locally and after a minor bug fix, it worked great!. I think that we can close this PR and proceed with #8950.

I will comment on the small bug I found.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 22, 2016
@Kureev Kureev closed this Aug 22, 2016
@vivekparekh8
Copy link

vivekparekh8 commented Oct 20, 2016

Waiting for #8950 to update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants