Add support for p4a --feature option

See https://github.com/kivy/python-for-android/pull/2322
This commit is contained in:
Eero af Heurlin 2020-09-25 12:39:26 +00:00 committed by Mathieu Virbel
parent fdb3d78739
commit 2c445735bf
2 changed files with 8 additions and 0 deletions

View file

@ -90,6 +90,9 @@ fullscreen = 0
# (list) Permissions
#android.permissions = INTERNET
# (list) features (adds uses-feature -tags to manifest)
#android.features = android.hardware.usb.host
# (int) Target Android API, should be as high as possible.
#android.api = 27

View file

@ -1051,6 +1051,11 @@ class TargetAndroid(Target):
permission = '.'.join(permission)
build_cmd += [("--permission", permission)]
# add features
features = config.getlist('app', 'android.features', [])
for feature in features:
build_cmd += [("--feature", feature)]
# android.entrypoint
entrypoint = config.getdefault('app', 'android.entrypoint', 'org.kivy.android.PythonActivity')
build_cmd += [('--android-entrypoint', entrypoint)]