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

implement getting Main Activity from an Activity alias on Android #2310

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andresesfm
Copy link

@andresesfm andresesfm commented Feb 27, 2024

Summary:

Android Manifests might contain Activity aliases: https://developer.android.com/guide/topics/manifest/activity-alias-element. This allows mapping activity paths. Such aliases might contain <intent-filter>s no different from regular activities.

Test Plan:

Unit Test have been added.

In an Android project.
Create an activity and an activity-alias.
Make the activity alias point to the actual activity.
The alias should have the launcher category and main action. (Making it the main activity)
Expected: running react-native android should launch as expected on the device

Checklist

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

@andresesfm andresesfm changed the title implement getting Main Activity from an Activity Alias on Android implement getting Main Activity from an Activity alias on Android Feb 27, 2024
@thymikee
Copy link
Member

@cortinico would you mind giving this a review? Seems fine on my end, but I haven't used aliases yet, so I don't know the broader context or consequences of supporting that.

@cortinico
Copy link
Member

I have to mention that I'm not a huge fan of this. It adds maintenance cost cli-platform-android for a very edge case feature. Users could still configure this on their end if they're using activity-alias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants