forked from kivy/python-for-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAndroidManifest.tmpl.xml
More file actions
119 lines (99 loc) · 4.08 KB
/
AndroidManifest.tmpl.xml
File metadata and controls
119 lines (99 loc) · 4.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="{{args.package}}"
android:versionCode="{{args.numeric_version}}"
android:versionName="{{args.version}}"
android:installLocation="{{ args.install_location }}"
>
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true"
{% if android_api >= 9 %}
android:xlargeScreens="true"
{% endif %}
/>
<application android:label="@string/appName"
android:icon="@drawable/icon"
android:hardwareAccelerated="true"
>
{% for m in args.meta_data %}
<meta-data android:name="{{ m.split('=', 1)[0] }}" android:value="{{ m.split('=', 1)[-1] }}"/>{% endfor %}
<meta-data android:name="fullscreen" android:value="{% if args.window %}0{% else %}1{% endif %}"/>
<meta-data android:name="wakelock" android:value="{% if args.wakelock %}1{% else %}0{% endif %}"/>
<activity android:name="org.renpy.android.PythonActivity"
android:label="@string/iconName"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|fontScale|uiMode{% if android_api >= 13 %}|screenSize{% endif %}"
android:launchMode="singleTask"
android:process=":python"
android:screenOrientation="{{ args.orientation }}"
android:windowSoftInputMode="stateAlwaysHidden"
>
{% if args.launcher %}
<intent-filter>
<action android:name="org.renpy.LAUNCH" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="{{ url_scheme }}" />
</intent-filter>
{% else %}
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
{% endif %}
{%if args.ouya_category %}
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="tv.ouya.intent.category.{{ args.ouya_category }}"/>
</intent-filter>
{% endif %}
{%if args.intent_filters %}
{{ intent_filters }}
{% endif %}
</activity>
{% if args.launcher %}
<activity android:name="org.renpy.android.ProjectChooser"
android:label="@string/iconName">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
{% endif %}
{% if service or args.launcher %}
<service android:name="org.renpy.android.PythonService"
android:process=":PythonService"/>
{% endif %}
{% if args.billing_pubkey %}
<service android:name="org.renpy.android.billing.BillingService"
android:process=":python" />
<receiver
android:name="org.renpy.android.billing.BillingReceiver"
android:process=":python">
<intent-filter>
<action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
<action android:name="com.android.vending.billing.RESPONSE_CODE" />
<action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />
</intent-filter>
</receiver>
{% endif %}
</application>
<uses-sdk android:minSdkVersion="{{ args.min_sdk_version }}" android:targetSdkVersion="{{ args.sdk_version }}"/>
{% if args.wakelock %}
<uses-permission android:name="android.permission.WAKE_LOCK" />
{% endif %}
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
{% for perm in args.permissions %}
{% if '.' in perm %}
<uses-permission android:name="{{ perm }}" />
{% else %}
<uses-permission android:name="android.permission.{{ perm }}" />
{% endif %}
{% endfor %}
{% if args.billing_pubkey %}
<uses-permission android:name="com.android.vending.BILLING" />
{% endif %}
{{ manifest_extra }}
</manifest>