|
| 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 | +--> |
| 5 | +<manifest xmlns:android="http://schemas.android.com/apk/res/android" |
| 6 | + package="{{ args.package }}" |
| 7 | + android:versionCode="{{ args.numeric_version }}" |
| 8 | + android:versionName="{{ args.version }}" |
| 9 | + android:installLocation="auto"> |
| 10 | + |
| 11 | + <supports-screens |
| 12 | + android:smallScreens="true" |
| 13 | + android:normalScreens="true" |
| 14 | + android:largeScreens="true" |
| 15 | + android:anyDensity="true" |
| 16 | + {% if args.min_sdk_version >= 9 %} |
| 17 | + android:xlargeScreens="true" |
| 18 | + {% endif %} |
| 19 | + /> |
| 20 | + |
| 21 | + <!-- Android 2.3.3 --> |
| 22 | + <uses-sdk android:minSdkVersion="{{ args.min_sdk_version }}" android:targetSdkVersion="{{ android_api }}" /> |
| 23 | + |
| 24 | + <!-- OpenGL ES 2.0 --> |
| 25 | + <uses-feature android:glEsVersion="0x00020000" /> |
| 26 | + |
| 27 | + <!-- Set permissions --> |
| 28 | + {% for perm in args.permissions %} |
| 29 | + <uses-permission android:name="{{ perm.name }}"{% if perm.maxSdkVersion %} android:maxSdkVersion="{{ perm.maxSdkVersion }}"{% endif %}{% if perm.usesPermissionFlags %} android:usesPermissionFlags="{{ perm.usesPermissionFlags }}"{% endif %} /> |
| 30 | + {% endfor %} |
| 31 | + |
| 32 | + {% if args.wakelock %} |
| 33 | + <uses-permission android:name="android.permission.WAKE_LOCK" /> |
| 34 | + {% endif %} |
| 35 | + |
| 36 | + {% if args.billing_pubkey %} |
| 37 | + <uses-permission android:name="com.android.vending.BILLING" /> |
| 38 | + {% endif %} |
| 39 | + |
| 40 | + {{ args.extra_manifest_xml }} |
| 41 | + |
| 42 | + |
| 43 | + <!-- Create a Java class extending SDLActivity and place it in a |
| 44 | + directory under src matching the package, e.g. |
| 45 | + src/com/gamemaker/game/MyGame.java |
| 46 | +
|
| 47 | + then replace "SDLActivity" with the name of your class (e.g. "MyGame") |
| 48 | + in the XML below. |
| 49 | +
|
| 50 | + An example Java class can be found in README-android.txt |
| 51 | + --> |
| 52 | + <application android:label="@string/app_name" |
| 53 | + {% if debug %}android:debuggable="true"{% endif %} |
| 54 | + android:icon="@mipmap/icon" |
| 55 | + android:allowBackup="{{ args.allow_backup }}" |
| 56 | + {% if args.backup_rules %}android:fullBackupContent="@xml/{{ args.backup_rules }}"{% endif %} |
| 57 | + {{ args.extra_manifest_application_arguments }} |
| 58 | + android:theme="{{args.android_apptheme}}{% if not args.window %}.Fullscreen{% endif %}" |
| 59 | + android:hardwareAccelerated="true" |
| 60 | + android:enableOnBackInvokedCallback="true" |
| 61 | + android:extractNativeLibs="true" > |
| 62 | + {% for l in args.android_used_libs %} |
| 63 | + <uses-library android:name="{{ l }}" /> |
| 64 | + {% endfor %} |
| 65 | + |
| 66 | + {% for m in args.meta_data %} |
| 67 | + <meta-data android:name="{{ m.split('=', 1)[0] }}" android:value="{{ m.split('=', 1)[-1] }}"/>{% endfor %} |
| 68 | + <meta-data android:name="wakelock" android:value="{% if args.wakelock %}1{% else %}0{% endif %}"/> |
| 69 | + |
| 70 | + <activity android:name="{{args.android_entrypoint}}" |
| 71 | + android:label="@string/app_name" |
| 72 | + android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|fontScale|uiMode{% if args.min_sdk_version >= 8 %}|uiMode{% endif %}{% if args.min_sdk_version >= 13 %}|screenSize|smallestScreenSize{% endif %}{% if args.min_sdk_version >= 17 %}|layoutDirection{% endif %}{% if args.min_sdk_version >= 24 %}|density{% endif %}" |
| 73 | + android:screenOrientation="{{ args.manifest_orientation }}" |
| 74 | + android:exported="true" |
| 75 | + {% if args.activity_launch_mode %} |
| 76 | + android:launchMode="{{ args.activity_launch_mode }}" |
| 77 | + {% endif %} |
| 78 | + > |
| 79 | + |
| 80 | + <intent-filter> |
| 81 | + {% if args.launcher %} |
| 82 | + <action android:name="org.kivy.LAUNCH" /> |
| 83 | + <category android:name="android.intent.category.DEFAULT" /> |
| 84 | + <data android:scheme="{{ url_scheme }}" /> |
| 85 | + {% else %} |
| 86 | + <action android:name="android.intent.action.MAIN" /> |
| 87 | + <category android:name="android.intent.category.LAUNCHER" /> |
| 88 | + {% endif %} |
| 89 | + |
| 90 | + {% if args.home_app %} |
| 91 | + <category android:name="android.intent.category.HOME" /> |
| 92 | + <category android:name="android.intent.category.DEFAULT" /> |
| 93 | + {% endif %} |
| 94 | + </intent-filter> |
| 95 | + |
| 96 | + {%- if args.intent_filters -%} |
| 97 | + {{- args.intent_filters -}} |
| 98 | + {%- endif -%} |
| 99 | + </activity> |
| 100 | + |
| 101 | + {% if args.launcher %} |
| 102 | + <activity android:name="org.kivy.android.launcher.ProjectChooser" |
| 103 | + android:icon="@mipmap/icon" |
| 104 | + android:label="@string/app_name" |
| 105 | + android:exported="true"> |
| 106 | + |
| 107 | + <intent-filter> |
| 108 | + <action android:name="android.intent.action.MAIN" /> |
| 109 | + <category android:name="android.intent.category.LAUNCHER" /> |
| 110 | + </intent-filter> |
| 111 | + |
| 112 | + </activity> |
| 113 | + {% endif %} |
| 114 | + |
| 115 | + {% if service or args.launcher %} |
| 116 | + <service android:name="{{ args.service_class_name }}" |
| 117 | + android:process=":pythonservice" /> |
| 118 | + {% endif %} |
| 119 | + {% for name in service_names %} |
| 120 | + <service android:name="{{ args.package }}.Service{{ name|capitalize }}" |
| 121 | + android:process=":service_{{ name }}" /> |
| 122 | + {% endfor %} |
| 123 | + {% for name in native_services %} |
| 124 | + <service android:name="{{ name }}" /> |
| 125 | + {% endfor %} |
| 126 | + |
| 127 | + {% if args.billing_pubkey %} |
| 128 | + <service android:name="org.kivy.android.billing.BillingReceiver" |
| 129 | + android:process=":pythonbilling" /> |
| 130 | + <receiver android:name="org.kivy.android.billing.BillingReceiver" |
| 131 | + android:process=":pythonbillingreceiver" |
| 132 | + android:exported="false"> |
| 133 | + <intent-filter> |
| 134 | + <action android:name="com.android.vending.billing.IN_APP_NOTIFY" /> |
| 135 | + <action android:name="com.android.vending.billing.RESPONSE_CODE" /> |
| 136 | + <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" /> |
| 137 | + </intent-filter> |
| 138 | + </receiver> |
| 139 | + {% endif %} |
| 140 | + {% for a in args.add_activity %} |
| 141 | + <activity android:name="{{ a }}"></activity> |
| 142 | + {% endfor %} |
| 143 | + </application> |
| 144 | + |
| 145 | +</manifest> |
0 commit comments