Skip to content

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

Open
@timbo-tj

Description

@timbo-tj

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions