Skip to content

Commit 7b8cfc8

Browse files
committed
Fix templates for launcher, add icons
1 parent de180a8 commit 7b8cfc8

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

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

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,39 @@
6666
android:configChanges="keyboardHidden|orientation"
6767
android:screenOrientation="{{ args.orientation }}"
6868
>
69+
70+
{% if args.launcher %}
71+
<intent-filter>
72+
<action android:name="org.kivy.LAUNCH" />
73+
<category android:name="android.intent.category.DEFAULT" />
74+
<data android:scheme="{{ url_scheme }}" />
75+
</intent-filter>
76+
{% else %}
6977
<intent-filter>
7078
<action android:name="android.intent.action.MAIN" />
7179
<category android:name="android.intent.category.LAUNCHER" />
7280
</intent-filter>
81+
{% endif %}
82+
7383
{%- if args.intent_filters -%}
7484
{{- args.intent_filters -}}
7585
{%- endif -%}
7686
</activity>
7787

78-
{% if service %}
88+
{% if args.launcher %}
89+
<activity android:name="org.kivy.android.ProjectChooser"
90+
android:icon="@drawable/icon"
91+
android:label="@string/app_name">
92+
93+
<intent-filter>
94+
<action android:name="android.intent.action.MAIN" />
95+
<category android:name="android.intent.category.LAUNCHER" />
96+
</intent-filter>
97+
98+
</activity>
99+
{% endif %}
100+
101+
{% if service or args.launcher %}
79102
<service android:name="org.kivy.android.PythonService"
80103
android:process=":pythonservice" />
81104
{% endif %}
@@ -98,4 +121,4 @@
98121
{% endif %}
99122
</application>
100123

101-
</manifest>
124+
</manifest>
17 KB
Loading
13.6 KB
Loading

pythonforandroid/bootstraps/sdl2/build/templates/strings.tmpl.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
<string name="app_name">{{ args.name }}</string>
44
<string name="private_version">0.1</string>
55
<string name="presplash_color">{{ args.presplash_color }}</string>
6+
<string name="urlScheme">{{ url_scheme }}</string>
67
</resources>

0 commit comments

Comments
 (0)