|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | | -<!-- Replace org.libsdl.app with the identifier of your game below, e.g. |
3 | | - com.gamemaker.game |
4 | | ---> |
| 2 | +<!-- AndroidManifest template for Kivy app, adaptive and compliant with Android 16+ --> |
5 | 3 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
6 | 4 | android:versionCode="{{ args.numeric_version }}" |
7 | 5 | android:versionName="{{ args.version }}" |
8 | 6 | android:installLocation="auto"> |
9 | 7 |
|
| 8 | + <!-- Declare support for all screen sizes --> |
10 | 9 | <supports-screens |
11 | | - android:smallScreens="true" |
12 | | - android:normalScreens="true" |
13 | | - android:largeScreens="true" |
14 | | - android:anyDensity="true" |
15 | | - {% if args.min_sdk_version >= 9 %} |
16 | | - android:xlargeScreens="true" |
17 | | - {% endif %} |
| 10 | + android:smallScreens="true" |
| 11 | + android:normalScreens="true" |
| 12 | + android:largeScreens="true" |
| 13 | + android:anyDensity="true" |
| 14 | + {% if args.min_sdk_version >= 9 %} |
| 15 | + android:xlargeScreens="true" |
| 16 | + {% endif %} |
18 | 17 | /> |
19 | 18 |
|
20 | | - <!-- Android 2.3.3 --> |
| 19 | + <!-- SDK versions --> |
21 | 20 | <uses-sdk android:minSdkVersion="{{ args.min_sdk_version }}" android:targetSdkVersion="{{ android_api }}" /> |
22 | 21 |
|
23 | 22 | <!-- OpenGL ES 2.0 --> |
24 | 23 | <uses-feature android:glEsVersion="0x00020000" /> |
25 | 24 |
|
26 | | - <!-- Set permissions --> |
| 25 | + <!-- Permissions --> |
27 | 26 | {% for perm in args.permissions %} |
28 | 27 | <uses-permission android:name="{{ perm.name }}"{% if perm.maxSdkVersion %} android:maxSdkVersion="{{ perm.maxSdkVersion }}"{% endif %}{% if perm.usesPermissionFlags %} android:usesPermissionFlags="{{ perm.usesPermissionFlags }}"{% endif %} /> |
29 | 28 | {% endfor %} |
|
38 | 37 |
|
39 | 38 | {{ args.extra_manifest_xml }} |
40 | 39 |
|
41 | | - |
42 | | - <!-- Create a Java class extending SDLActivity and place it in a |
43 | | - directory under src matching the package, e.g. |
44 | | - src/com/gamemaker/game/MyGame.java |
45 | | -
|
46 | | - then replace "SDLActivity" with the name of your class (e.g. "MyGame") |
47 | | - in the XML below. |
48 | | -
|
49 | | - An example Java class can be found in README-android.txt |
50 | | - --> |
| 40 | + <!-- Application --> |
51 | 41 | <application android:label="@string/app_name" |
52 | 42 | {% if debug %}android:debuggable="true"{% endif %} |
53 | 43 | android:icon="@mipmap/ic_launcher" |
|
57 | 47 | {{ args.extra_manifest_application_arguments }} |
58 | 48 | android:theme="{{args.android_apptheme}}{% if not args.window %}.Fullscreen{% endif %}" |
59 | 49 | android:hardwareAccelerated="true" |
60 | | - android:extractNativeLibs="true" > |
| 50 | + android:extractNativeLibs="true" |
| 51 | + android:resizeableActivity="true" |
| 52 | + android:supportsPictureInPicture="false"> |
| 53 | + |
61 | 54 | {% for l in args.android_used_libs %} |
62 | 55 | <uses-library android:name="{{ l }}" /> |
63 | 56 | {% endfor %} |
|
66 | 59 | <meta-data android:name="{{ m.split('=', 1)[0] }}" android:value="{{ m.split('=', 1)[-1] }}"/>{% endfor %} |
67 | 60 | <meta-data android:name="wakelock" android:value="{% if args.wakelock %}1{% else %}0{% endif %}"/> |
68 | 61 |
|
69 | | - <activity android:name="{{ args.android_entrypoint }}" |
| 62 | + <!-- Main activity --> |
| 63 | + <activity android:name="{{ args.android_entrypoint }}" |
70 | 64 | android:label="@string/app_name" |
71 | 65 | android:resizeableActivity="true" |
72 | | - android:supportsPictureInPicture="true" |
73 | 66 | android:exported="true" |
74 | 67 | android:launchMode="{% if args.activity_launch_mode %}{{ args.activity_launch_mode }}{% else %}singleTask{% endif %}" |
75 | 68 | android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|uiMode|keyboardHidden|density|layoutDirection" |
76 | 69 | android:windowSoftInputMode="adjustResize" |
77 | | - android:screenOrientation="portrait"> |
| 70 | + android:screenOrientation="unspecified"> |
| 71 | + |
| 72 | + <!-- Adaptive tablet/foldable metadata --> |
| 73 | + <meta-data android:name="android.max_aspect" android:value="2.1" /> |
| 74 | + <meta-data android:name="android.resizeableActivity" android:value="true" /> |
78 | 75 |
|
79 | 76 | <intent-filter> |
80 | 77 | {% if args.launcher %} |
|
108 | 105 | <action android:name="android.intent.action.MAIN" /> |
109 | 106 | <category android:name="android.intent.category.LAUNCHER" /> |
110 | 107 | </intent-filter> |
111 | | - |
112 | 108 | </activity> |
113 | 109 | {% endif %} |
114 | 110 |
|
|
137 | 133 | </intent-filter> |
138 | 134 | </receiver> |
139 | 135 | {% endif %} |
140 | | - {% for a in args.add_activity %} |
141 | | - <activity android:name="{{ a }}"></activity> |
142 | | - {% endfor %} |
| 136 | + |
| 137 | + {% for a in args.add_activity %} |
| 138 | + <activity android:name="{{ a }}"></activity> |
| 139 | + {% endfor %} |
143 | 140 | </application> |
144 | 141 |
|
145 | 142 | </manifest> |
0 commit comments