Skip to content

Commit e275da0

Browse files
manuqdbnicholson
authored andcommitted
webview: Allow passing activity meta-data
to the Android manifest XML. https://phabricator.endlessm.com/T33607
1 parent c547b38 commit e275da0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

pythonforandroid/bootstraps/common/build/build.py

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,8 @@ def parse_args_and_make_package(args=None):
690690
help='The permissions to give this app.', nargs='+')
691691
ap.add_argument('--meta-data', dest='meta_data', action='append', default=[],
692692
help='Custom key=value to add in application metadata')
693+
ap.add_argument('--activity-meta-data', dest='activity_meta_data', action='append', default=[],
694+
help='Custom key=value to add in activity metadata')
693695
ap.add_argument('--uses-library', dest='android_used_libs', action='append', default=[],
694696
help='Used shared libraries included using <uses-library> tag in AndroidManifest.xml')
695697
ap.add_argument('--asset', dest='assets',

pythonforandroid/bootstraps/webview/build/templates/AndroidManifest.tmpl.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@
7979
{%- if args.intent_filters -%}
8080
{{- args.intent_filters -}}
8181
{%- endif -%}
82+
{% for m in args.activity_meta_data %}
83+
<meta-data android:name="{{ m.split('=', 1)[0] }}" android:value="{{ m.split('=', 1)[-1] }}"/>{% endfor %}
8284
</activity>
8385

8486
{% if service %}

0 commit comments

Comments
 (0)