diff --git a/buildozer/default.spec b/buildozer/default.spec index b33a62d88..b5bcae7e8 100644 --- a/buildozer/default.spec +++ b/buildozer/default.spec @@ -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 diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index b8738bfe5..374dc6fb6 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -1051,6 +1051,11 @@ def build_package(self): 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)]