Add --extra-manifest-application-xml for injecting elements inside <application> - #3377
Merged
kuzeyron merged 2 commits intoSep 10, 2026
Merged
Conversation
…pplication> There's currently no way to add an arbitrary child element (like a <provider>, needed for e.g. a FileProvider) inside <application> in the generated AndroidManifest.xml: - --extra-manifest-xml writes at the <manifest> root, as a sibling of <application> -- a <provider> there is invalid, providers must be nested inside <application>. - --extra-manifest-application-arguments only splices into the <application ...> opening tag's attribute list, so it can't hold a full child element either. This is a real gap: a FileProvider (needed to hand another app, e.g. a camera app, a content:// Uri instead of a file:// one and avoid FileUriExposedException on API 24+) requires exactly this kind of <provider> entry, and there's currently no supported way to add one without patching the rendered manifest after the fact via a p4a.hook. Adds --extra-manifest-application-xml, rendered immediately before </application> in every bootstrap's manifest template, alongside the two existing options.
Contributor
|
Thanks #3173 |
T-Dynamos
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's currently no way to add an arbitrary child element (like a , needed for e.g. a FileProvider) inside in the generated AndroidManifest.xml:
This is a real gap: a FileProvider (needed to hand another app, e.g. a camera app, a content:// Uri instead of a file:// one and avoid FileUriExposedException on API 24+) requires exactly this kind of entry, and there's currently no supported way to add one without patching the rendered manifest after the fact via a p4a.hook.
Adds --extra-manifest-application-xml, rendered immediately before in every bootstrap's manifest template, alongside the two existing options.