Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

4.1 KB
Raw Blame
<?xml version="1.0" encoding="utf-8"?>
<!--
  The APK's manifest, as a template. Packaging substitutes the app's identity from
  the exported project's app.config.json: an installed app has one identity, one
  version and one orientation, and none of them can be decided here.

  Everything left alone is the host itself: a NativeActivity, Vulkan 1.0.3 as a
  hard requirement, and the config changes the host handles rather than being
  restarted for. `hasCode` follows whether the Java shim compiled — the game is
  native, and the only Java in the package is the IME's side of a text field.

  minSdkVersion 29, and the NDK MUST build against the same number (`--platform`,
  build-tools/tasks/native.js). The host calls AFontMatcher_create unguarded and
  that is API 29, so nothing below it could ever have run; 26 promised three
  releases the code never supported. The equality is what makes the availability
  guards work: the NDK emits a weak reference only for an API newer than the
  build target, so building above the declared floor compiles every
  `__builtin_available` out and turns its symbol into a load-time requirement.
  Built at android-33, the released host could not dlopen below API 31 —
  "cannot locate symbol APerformanceHint_getManager" on Android 10 and 11.

  29 is also where ELF TLS begins, and that is the reason the floor cannot go
  lower by guarding more calls. Built at or above 29, every thread_local in the
  host and in Dawn resolves through __tls_get_addr@LIBC_Q, a versioned symbol
  no older loader has — the .so does not load below 29, whatever the manifest
  promises. Built below 29, the compiler lowers ALL of it to emulated TLS
  instead, and that build is not the same renderer: Dawn compiled at
  android-24 drew postprocess-effects as one flat black frame on the API 34
  emulator while thirteen other examples were bit-identical (v0.41.0's smoke;
  exp/dawn-android-api29 isolated the variable — the two builds' import tables
  differ in nothing but the TLS mechanism). Android 7-9 support therefore means
  shipping and separately verifying an emulated-TLS build, not loosening this
  number.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="@APP_ID@"
          android:versionCode="@VERSION_CODE@"
          android:versionName="@VERSION_NAME@">
    <uses-sdk android:minSdkVersion="29" android:targetSdkVersion="33" />
    <!-- Without it every socket the app opens is refused: a remote group's assets,
         a hot update and the debug channel all go over the network. A normal
         permission, granted at install without asking. -->
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-feature android:name="android.hardware.vulkan.version" android:version="0x400003" android:required="true" />
    <!-- usesCleartextTraffic: a development build talks to a LAN server over plain
         http; a shipping build is held to https, as Android 9+ holds every app. -->
    <application android:label="@APP_NAME@" android:icon="@mipmap/ic_launcher"
                 android:hasCode="@HAS_CODE@" android:extractNativeLibs="false"
                 android:usesCleartextTraffic="@USES_CLEARTEXT@">
        <!-- A game's window, stated before any code runs: no title, no status bar.
             The host asks for the rest (navigation bar, display cutout) once it
             has the UI thread — see onWindowFocusChanged in platform/android.cpp. -->
        <activity android:name="android.app.NativeActivity"
                  android:label="@APP_NAME@"
                  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                  android:screenOrientation="@SCREEN_ORIENTATION@"
                  android:configChanges="orientation|keyboardHidden|screenSize|screenLayout|density"
                  android:exported="true">
            <meta-data android:name="android.app.lib_name" android:value="estella_js_host" />
            <intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter>
        </activity>
    </application>
</manifest>