diff --git a/doc/source/buildoptions.rst b/doc/source/buildoptions.rst index 98e07712d5..4acefa1885 100644 --- a/doc/source/buildoptions.rst +++ b/doc/source/buildoptions.rst @@ -71,6 +71,7 @@ options (this list may not be exhaustive): - ``--icon``: A path to the png file to use as the application icon. - ``--permission``: A permission that needs to be declared into the App ``AndroidManifest.xml``. For multiple permissions, add multiple ``--permission`` arguments. + ``--home-app`` Gives you the option to set your application as a home app (launcher) on your Android device. .. Note :: ``--permission`` accepts the following syntaxes: diff --git a/pythonforandroid/bootstraps/common/build/build.py b/pythonforandroid/bootstraps/common/build/build.py index 01f5c881b5..97fd48daf6 100644 --- a/pythonforandroid/bootstraps/common/build/build.py +++ b/pythonforandroid/bootstraps/common/build/build.py @@ -773,6 +773,8 @@ def create_argument_parser(): ap.add_argument('--launcher', dest='launcher', action='store_true', help=('Provide this argument to build a multi-app ' 'launcher, rather than a single app.')) + ap.add_argument('--home-app', dest='home_app', action='store_true', default=False, + help=('Turn your application into a home app (launcher)')) ap.add_argument('--permission', dest='permissions', action='append', default=[], help='The permissions to give this app.', nargs='+') ap.add_argument('--meta-data', dest='meta_data', action='append', default=[], diff --git a/pythonforandroid/bootstraps/sdl2/build/templates/AndroidManifest.tmpl.xml b/pythonforandroid/bootstraps/sdl2/build/templates/AndroidManifest.tmpl.xml index f33e9c81e0..3353c0a0d5 100644 --- a/pythonforandroid/bootstraps/sdl2/build/templates/AndroidManifest.tmpl.xml +++ b/pythonforandroid/bootstraps/sdl2/build/templates/AndroidManifest.tmpl.xml @@ -76,19 +76,22 @@ {% endif %} > - {% if args.launcher %} + {% if args.launcher %} - {% else %} - - {% endif %} + {% if args.home_app %} + + + {% endif %} + + {%- if args.intent_filters -%} {{- args.intent_filters -}} {%- endif -%}