Merge pull request #612 from bauerj/add-activity

Allow adding Java activities to the manifest
This commit is contained in:
Mathieu Virbel 2018-01-26 11:00:02 +01:00 committed by GitHub
commit 94691c0138
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -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

View file

@ -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: