added android.activity_class_name option

This commit is contained in:
Veselin Penev 2020-06-24 23:32:28 +02:00
parent 54b2975f57
commit 53bacca6ef
2 changed files with 11 additions and 2 deletions

View file

@ -132,7 +132,11 @@ fullscreen = 0
# android.accept_sdk_license = False
# (str) Android entry point, default is ok for Kivy-based app
#android.entrypoint = org.renpy.android.PythonActivity
#android.entrypoint = org.kivy.android.PythonActivity
# (str) Full name including package path of the Java class that implements Android Activity
# use that parameter together with android.entrypoint to set custom Java class instead of PythonActivity
#android.activity_class_name = org.kivy.android.PythonActivity
# (str) Android app theme, default is ok for Kivy-based app
#android.apptheme = "@android:style/Theme.NoTitleBar"

View file

@ -98,6 +98,11 @@ class TargetAndroid(Target):
else:
self.extra_p4a_args += ' --ignore-setup-py'
activity_class_name = self.buildozer.config.getdefault(
'app', 'android.activity_class_name', 'org.kivy.android.PythonActivity')
if activity_class_name != 'org.kivy.android.PythonActivity':
self.extra_p4a_args += ' --activity-class-name={}'.format(activity_class_name)
self.warn_on_deprecated_tokens()
def warn_on_deprecated_tokens(self):