allow setting launchMode for the main activity in the manifest

This commit is contained in:
SomberNight 2018-04-09 17:29:21 +02:00
parent 94691c0138
commit f3560b4f84
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9
2 changed files with 9 additions and 0 deletions

View file

@ -162,6 +162,9 @@ fullscreen = 0
# (str) XML file to include as an intent filters in <activity> 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

View file

@ -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", )]