Skip to content

Commit 3dcd0d3

Browse files
authored
Merge pull request #5 from endlessm/T33607-activity-metadata
webview: Allow passing activity meta-data
2 parents 82c966b + db77497 commit 3dcd0d3

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
@@ -685,6 +685,8 @@ def parse_args_and_make_package(args=None):
685685
help='The permissions to give this app.', nargs='+')
686686
ap.add_argument('--meta-data', dest='meta_data', action='append', default=[],
687687
help='Custom key=value to add in application metadata')
688+
ap.add_argument('--activity-meta-data', dest='activity_meta_data', action='append', default=[],
689+
help='Custom key=value to add in activity metadata')
688690
ap.add_argument('--uses-library', dest='android_used_libs', action='append', default=[],
689691
help='Used shared libraries included using <uses-library> tag in AndroidManifest.xml')
690692
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
@@ -78,6 +78,8 @@
7878
{%- if args.intent_filters -%}
7979
{{- args.intent_filters -}}
8080
{%- endif -%}
81+
{% for m in args.activity_meta_data %}
82+
<meta-data android:name="{{ m.split('=', 1)[0] }}" android:value="{{ m.split('=', 1)[-1] }}"/>{% endfor %}
8183
</activity>
8284

8385
{% if service %}

0 commit comments

Comments
 (0)