Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: skip if there's no action or category #2432

Merged
merged 2 commits into from
Jun 26, 2024

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
8 of 10 checks passed
@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
3 participants