diff --git a/buildozer/default.spec b/buildozer/default.spec index 612f79e2f..1c273d31d 100644 --- a/buildozer/default.spec +++ b/buildozer/default.spec @@ -231,6 +231,12 @@ android.arch = armeabi-v7a # (bool) enables Android auto backup feature (Android API >=23) android.allow_backup = True +# (str) If you need to insert variables into your AndroidManifest.xml file, +# you can do so with the manifestPlaceholders property. +# This property takes a map of key-value pairs. (via a string) +# Usage example : android.manifest_placeholders = [myCustomUrl:\"org.kivy.customurl\"] +android.manifest_placeholders = [:] + # # Python for android (p4a) specific # diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index 6d9be36ad..a1a7b6723 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -891,6 +891,12 @@ def execute_build_package(self, build_cmd): cmd.append('--depend') cmd.append(gradle_dependency) + # support for manifestPlaceholders + manifest_placeholders = self.buildozer.config.getdefault('app', 'android.manifest_placeholders', '[:]') + if manifest_placeholders: + cmd.append('--manifest-placeholders') + cmd.append("{}".format(manifest_placeholders)) + cmd.append('--arch') cmd.append(self._arch)