Skip to content

Commit 2496da8

Browse files
committed
Adding support for including XML elements within <manifest><application>
1 parent 9503f5f commit 2496da8

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

buildozer/default.spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ fullscreen = 0
147147
# use that parameter to provide a filename from where to load your custom XML code
148148
#android.extra_manifest_xml = ./src/android/extra_manifest.xml
149149

150+
# (str) Extra xml to write directly inside the <manifest><application> element of AndroidManifest.xml
151+
# use that parameter to provide a filename from where to load your custom XML code
152+
#android.extra_manifest_application_xml = ./src/android/extra_manifest_application_xml.xml
153+
150154
# (str) Extra xml to write directly inside the <manifest><application> tag of AndroidManifest.xml
151155
# use that parameter to provide a filename from where to load your custom XML arguments:
152156
#android.extra_manifest_application_arguments = ./src/android/extra_manifest_application_arguments.xml

buildozer/targets/android.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,12 @@ def execute_build_package(self, build_cmd):
955955
if extra_manifest_xml:
956956
cmd.append('--extra-manifest-xml="{}"'.format(open(extra_manifest_xml, 'rt').read()))
957957

958+
# support for extra-manifest-application
959+
extra_manifest_application_xml = self.buildozer.config.getdefault(
960+
'app', 'android.extra_manifest_application_xml', '')
961+
if extra_manifest_application_xml:
962+
cmd.append('--extra-manifest-application-xml="{}"'.format(open(extra_manifest_application_xml, 'rt').read().replace('"', '\\"')))
963+
958964
# support for extra-manifest-application-arguments
959965
extra_manifest_application_arguments = self.buildozer.config.getdefault(
960966
'app', 'android.extra_manifest_application_arguments', '')

0 commit comments

Comments
 (0)