From f3560b4f847e8678fc72591fa99c638687f5595f Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 9 Apr 2018 17:29:21 +0200 Subject: [PATCH] allow setting launchMode for the main activity in the manifest --- buildozer/default.spec | 3 +++ buildozer/targets/android.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/buildozer/default.spec b/buildozer/default.spec index 73e6cd8..611016f 100644 --- a/buildozer/default.spec +++ b/buildozer/default.spec @@ -162,6 +162,9 @@ fullscreen = 0 # (str) XML file to include as an intent filters in tag #android.manifest.intent_filters = +# (str) launchMode to set for the main activity +#android.manifest.launch_mode = standard + # (list) Android additionnal libraries to copy into libs/armeabi #android.add_libs_armeabi = libs/android/*.so #android.add_libs_armeabi_v7a = libs/android-v7/*.so diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index f554ffe..8a6d97f 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -773,6 +773,12 @@ class TargetAndroid(Target): build_cmd += [("--intent-filters", join(self.buildozer.root_dir, intent_filters))] + # activity launch mode + launch_mode = config.getdefault( + 'app', 'android.manifest.launch_mode', '') + if launch_mode: + build_cmd += [("--activity-launch-mode", launch_mode)] + # build only in debug right now. if self.build_mode == 'debug': build_cmd += [("debug", )]