Skip to content

Commit 19c5a2b

Browse files
committed
Adding support for including XML elements within <manifest><application>
1 parent 0b938d3 commit 19c5a2b

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
@@ -154,6 +154,10 @@ fullscreen = 0
154154
# use that parameter to provide a filename from where to load your custom XML code
155155
#android.extra_manifest_xml = ./src/android/extra_manifest.xml
156156

157+
# (str) Extra xml to write directly inside the <manifest><application> element of AndroidManifest.xml
158+
# use that parameter to provide a filename from where to load your custom XML code
159+
#android.extra_manifest_application_xml = ./src/android/extra_manifest_application_xml.xml
160+
157161
# (str) Extra xml to write directly inside the <manifest><application> tag of AndroidManifest.xml
158162
# use that parameter to provide a filename from where to load your custom XML arguments:
159163
#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
@@ -944,6 +944,12 @@ def execute_build_package(self, build_cmd):
944944
cmd.append('--extra-manifest-xml')
945945
cmd.append('{}'.format(open(extra_manifest_xml, 'rt').read()))
946946

947+
# support for extra-manifest-application
948+
extra_manifest_application_xml = self.buildozer.config.getdefault(
949+
'app', 'android.extra_manifest_application_xml', '')
950+
if extra_manifest_application_xml:
951+
cmd.append('--extra-manifest-application-xml={}'.format(open(extra_manifest_application_xml, 'rt').read()))
952+
947953
# support for extra-manifest-application-arguments
948954
extra_manifest_application_arguments = self.buildozer.config.getdefault(
949955
'app', 'android.extra_manifest_application_arguments', '')

0 commit comments

Comments
 (0)