Manifest cheat sheet
The manifest elements and attributes that actually matter: components, permissions, SDK levels, features and the attributes that change behaviour at install time.
The manifest is the contract between your app and the package manager. Everything in it is read at install time, before any of your code runs.
TL;DR#
<manifest>holds the package name, version and the<application>block.- The four component types are declared as
<activity>,<service>,<receiver>,<provider>. android:exportedis mandatory on any component with an intent filter when targeting API 31.<uses-permission>requests;<uses-feature>describes hardware requirements.targetSdkVersionopts you into behaviour changes;minSdkVersiongates installation.
Mental model#
The manifest is a form you fill in before entering a building: who you are, what you need access to, which doors you want keys for, and what equipment you will bring. The building reads it once, at the door, and remembers.
Where the analogy breaks#
Unlike a form, the manifest is compiled to binary XML and can be partly overlaid at build time by manifest merging from libraries, which is why the merged manifest is often longer than the one you wrote.
The big picture#
Text description of this diagram
The Android stack with the manifest boundary marked. The manifest is consumed by the package manager inside system_server, which is why it governs installation, component resolution and permission grants rather than runtime behaviour directly.
Deep dive#
Skeleton#
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app">
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="36" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-feature android:name="android.hardware.camera.any" android:required="false" />
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
</queries>
<application
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/Theme.App"
android:allowBackup="true"
android:supportsRtl="true">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".SyncService" android:exported="false" />
<receiver android:name=".BootReceiver" android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true" />
</application>
</manifest>The attributes that change behaviour#
| Attribute | Effect |
|---|---|
android:exported | whether other apps may start the component; mandatory with an intent filter from API 31 |
android:launchMode | how the activity is placed in a task |
android:process | run the component in another process |
android:configChanges | handle these changes yourself instead of being recreated |
android:directBootAware | may run before the user unlocks the device |
android:foregroundServiceType | required from API 34, with matching permissions |
android:allowBackup | whether the system may back up app data |
android:usesCleartextTraffic | whether plain HTTP is permitted (default false when targeting 28+) |
android:networkSecurityConfig | per-domain TLS and cleartext rules |
android:enableOnBackInvokedCallback | opt into predictive back |
How it evolved#
Curiosity corner#
packagein the manifest is legacy; the build overrides it withapplicationId, which is what identifies the app in the store.<queries>is not a permission request, but without it yourgetInstalledPackagesreturns a filtered list.
Try it#
adb shell dumpsys package com.example | head -60
adb shell cmd package dump com.example | grep -A20 "declared permissions"
Check yourself#
Check yourself
What does an API level identify?
Sources#
Sources
Every version number, API level, class name and date on this page is traced to one of these. Pages are re-verified against them; last_verified above says when.
- docsApp manifest overviewdeveloper.android.comaccessed 2026-10-27↩
- docsDeclare app permissions | Privacydeveloper.android.comaccessed 2026-10-27↩
- docs<uses-sdk> | App architecturedeveloper.android.comaccessed 2026-10-27↩
- docsApp Linksdeveloper.android.comaccessed 2026-10-27↩