diff --git a/pythonforandroid/bootstraps/common/build/build.py b/pythonforandroid/bootstraps/common/build/build.py index a91ac71e7f..83f84c2df1 100644 --- a/pythonforandroid/bootstraps/common/build/build.py +++ b/pythonforandroid/bootstraps/common/build/build.py @@ -461,6 +461,7 @@ def make_package(args): "service_names": service_names, "android_api": android_api, "debug": "debug" in args.build_mode, + "native_services": args.native_services } if get_bootstrap_name() == "sdl2": render_args["url_scheme"] = url_scheme @@ -619,6 +620,9 @@ def parse_args_and_make_package(args=None): ap.add_argument('--service', dest='services', action='append', default=[], help='Declare a new service entrypoint: ' 'NAME:PATH_TO_PY[:foreground]') + ap.add_argument('--native-service', dest='native_services', action='append', default=[], + help='Declare a new native service: ' + 'package.name.service') if get_bootstrap_name() != "service_only": ap.add_argument('--presplash', dest='presplash', help=('A jpeg file to use as a screen while the ' diff --git a/pythonforandroid/bootstraps/sdl2/build/templates/AndroidManifest.tmpl.xml b/pythonforandroid/bootstraps/sdl2/build/templates/AndroidManifest.tmpl.xml index a37e720753..8d2557090e 100644 --- a/pythonforandroid/bootstraps/sdl2/build/templates/AndroidManifest.tmpl.xml +++ b/pythonforandroid/bootstraps/sdl2/build/templates/AndroidManifest.tmpl.xml @@ -116,6 +116,9 @@ {% endfor %} + {% for name in native_services %} + + {% endfor %} {% if args.billing_pubkey %}