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

[FR]: Don't require a custom AndroidManifest.xml. Make required changes via 'IPostGenerateGradleAndroidProject' #1089

Open
timbo-tj opened this issue Aug 20, 2024 · 1 comment

Comments

@timbo-tj
Copy link

Description

Hey there

  1. We perform all our manifest modifications via IPostGenerateGradleAndroidProject. This allows all plugins to play nicely with each other and inject what they need into the manifest themselves. It means we dont have to create a custom manifest and we always use the 'default unity one' which means we're always on the latest manifest whenever we update Unity, too.
  2. Firebase messaging requires a custom AndroidManifest. It wants to change the activity name and it wants to add a service. This means that the manifest is now 'hardcoded' to whatever state it is in that version of Unity.
  3. Firebase should scan the android manifest in IPostGenerateGradleAndroidProject to look for the presence of the required Service and add or replace it if needed. Firebase should replace the activity name with its own one if the user opted in for this functionality. This can default to true, and more advance users can disable it if they wish. Though, as long as firebase's IPostGenerateGradleAndroidProject order/priority is low enough, advanced users can always write their own 'IPostGenerateGradleAndroidProject' with a higher order/priority and stomp over Firebases changes. (This is to support the use case of custom activity names. We already do this in our project since we have a custom activity and manually inherit MessagingUnityPlayerActivity)

API Proposal

No API changes required.

Firebase Product(s)

Messaging

Targeted Platform(s)

Android

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

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

No branches or pull requests

3 participants