Skip to content

Conversation

@szymonrybczak
Copy link
Collaborator

@szymonrybczak szymonrybczak commented Jun 14, 2023

Summary:

Fixes: #896

In this PR I created getMainActivity function that reads AndroidManifest.xml file and gets the main activity name.
Before this PR when user changed the main activity they have to manually provide main activity by option --main-activity.

Test Plan:

  1. Clone the repository and do all the required steps from the Contributing guide
  2. Change main activity name.
  3. Run this command:
node /path/to/react-native-cli/packages/cli/build/bin.js run-android

Main activity should be correctly read from AndroidManifest.xml and correctly launched on emulator.

@github-actions github-actions bot added docs Documentation change feature labels Jun 14, 2023
@szymonrybczak szymonrybczak force-pushed the feat/readMainActivityAutomatically branch 2 times, most recently from 3113c8b to bc0ca64 Compare June 14, 2023 09:15
@szymonrybczak szymonrybczak force-pushed the feat/readMainActivityAutomatically branch from bc0ca64 to e16ff7e Compare June 14, 2023 10:55
@szymonrybczak szymonrybczak marked this pull request as ready for review June 14, 2023 11:16
@szymonrybczak
Copy link
Collaborator Author

@cortinico Would you mind looking at this please? 🙏

@thymikee thymikee merged commit 7342221 into react-native-community:main Aug 17, 2023
@szymonrybczak szymonrybczak deleted the feat/readMainActivityAutomatically branch August 17, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation change feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

auto detect mainActivity from AndroidManifest.xml

4 participants