Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android manifest XML: Pass activity meta-data #2627

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pythonforandroid/bootstraps/common/build/build.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,8 @@ def parse_args_and_make_package(args=None):
help='The permissions to give this app.', nargs='+')
ap.add_argument('--meta-data', dest='meta_data', action='append', default=[],
help='Custom key=value to add in application metadata')
ap.add_argument('--activity-meta-data', dest='activity_meta_data', action='append', default=[],
help='Custom key=value to add in activity metadata')
ap.add_argument('--uses-library', dest='android_used_libs', action='append', default=[],
help='Used shared libraries included using <uses-library> tag in AndroidManifest.xml')
ap.add_argument('--asset', dest='assets',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
{%- if args.intent_filters -%}
{{- args.intent_filters -}}
{%- endif -%}
{% for m in args.activity_meta_data %}
<meta-data android:name="{{ m.split('=', 1)[0] }}" android:value="{{ m.split('=', 1)[-1] }}"/>{% endfor %}
</activity>

{% if args.launcher %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
{%- if args.intent_filters -%}
{{- args.intent_filters -}}
{%- endif -%}
{% for m in args.activity_meta_data %}
<meta-data android:name="{{ m.split('=', 1)[0] }}" android:value="{{ m.split('=', 1)[-1] }}"/>{% endfor %}
</activity>

{% if service %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@
{%- if args.intent_filters -%}
{{- args.intent_filters -}}
{%- endif -%}
{% for m in args.activity_meta_data %}
<meta-data android:name="{{ m.split('=', 1)[0] }}" android:value="{{ m.split('=', 1)[-1] }}"/>{% endfor %}
</activity>

{% if service %}
Expand Down