diff --git a/buildozer/default.spec b/buildozer/default.spec index c57e2fd..73e6cd8 100644 --- a/buildozer/default.spec +++ b/buildozer/default.spec @@ -146,6 +146,9 @@ fullscreen = 0 # bootstrap) #android.gradle_dependencies = +# (list) Java classes to add as activities to the manifest. +#android.add_activites = com.example.ExampleActivity + # (str) python-for-android branch to use, defaults to stable #p4a.branch = stable diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index a67db7f..f554ffe 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -719,6 +719,11 @@ class TargetAndroid(Target): raise SystemError('Failed to find jar file: {}'.format( pattern)) + # add Java activity + add_activities = config.getlist('app', 'android.add_activities', []) + for activity in add_activities: + build_cmd += [("--add-activity", activity)] + # add presplash presplash = config.getdefault('app', 'presplash.filename', '') if presplash: