Skip to content

Conversation

@szymonrybczak
Copy link
Collaborator

Summary:

Fixes #2392

If intent-filter with android.intent.action.MAIN and android.intent.category.LAUNCHER was preceded by an intent-filter without action/category getMainActivity function would fail.

Test Plan:

  1. Clone the repository and do all the required steps from the Contributing guide
  2. Put this snippet inside AndroidManifest.xml
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
      </intent-filter>
  1. Run this command:
node /path/to/react-native-cli/packages/cli/build/bin.js run-android
  1. App should launch correctly ✅

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

Comment on lines 6 to 8
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we align this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f5ff1fd there was something wrong with spaces, my editor was showing it correctly 🙈

@thymikee thymikee merged commit 988e149 into main Jun 26, 2024
@thymikee thymikee deleted the fix/handle-intents-without-category branch June 26, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read main activity from manifest not correctly handling activities with "missing" intent nodes

4 participants