Files
dioxus/packages/cli/assets/android/gen/app/src/main/AndroidManifest.xml.hbs
T
swaits 275fc84a4a CLI: ship uncompressed native libs (extractNativeLibs=false)
The Android template asked the installer to extract and copy every .so
out of the APK at install time. Since Android 6.0 the loader can map
them straight from an uncompressed, page-aligned APK, which is smaller
on disk, faster to install, and — the reason it matters here — the only
form in which a 16 KB-page-aligned library stays aligned. Play requires
16 KB page support for apps targeting API 35+, so the extracted path is
now a correctness problem, not only a size one.
2026-09-06 12:08:52 -06:00

66 lines
3.0 KiB
Handlebars

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Default permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Permissions from Dioxus.toml [permissions] section -->
{{#each permissions}}
<uses-permission android:name="{{ this }}" />
{{/each}}
<!-- Hardware features from Dioxus.toml [android] section -->
{{#each features}}
<uses-feature android:name="{{ this }}" android:required="true" />
{{/each}}
<!-- Raw manifest XML from Dioxus.toml [android.raw.manifest] -->
{{{ raw_manifest }}}
<application android:hasCode="true" android:icon="@mipmap/ic_launcher"
android:extractNativeLibs="false"
android:allowNativeHeapPointerTagging="false"
android:label="@string/app_name"
android:supportsRtl="{{#if supports_rtl}}{{ supports_rtl }}{{else}}true{{/if}}"
android:theme="{{#if app_theme}}{{ app_theme }}{{else}}@style/AppTheme{{/if}}"
{{#if uses_cleartext_traffic}}android:usesCleartextTraffic="{{ uses_cleartext_traffic }}"{{/if}}
{{#if large_heap}}android:largeHeap="{{ large_heap }}"{{/if}}
android:networkSecurityConfig="@xml/network_security_config">
<activity android:configChanges="orientation|screenLayout|screenSize|keyboardHidden" android:exported="true"
android:label="@string/app_name" android:name="dev.dioxus.main.MainActivity">
<meta-data android:name="android.app.lib_name" android:value="{{ lib_name }}" />
<meta-data android:name="android.app.func_name" android:value="ANativeActivity_onCreate" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
{{#each url_schemes}}
<!-- URL scheme deep link: {{ this }}:// -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="{{ this }}" />
</intent-filter>
{{/each}}
{{#each app_link_hosts}}
<!-- App link: https://{{ this }} -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="{{ this }}" />
</intent-filter>
{{/each}}
</activity>
{{#if foreground_service_type}}
<service
android:name=".DioxusForegroundService"
android:foregroundServiceType="{{ foreground_service_type }}"
android:exported="false" />
{{/if}}
</application>
</manifest>