Back to Roadmap
5:00

AndroidManifest Explained

The identity and configuration blueprint of every Android application

5 MIN READ VERIFIED CURRICULUM

Every Android application has a core configuration file called AndroidManifest.xml. It is one of the most important files in an Android project because it tells the system everything it needs to know about your app before it even runs.

Without the manifest, Android would not know which screen to launch, what permissions the app needs, or what components (Activities, Services, Receivers) exist inside the application.

What is AndroidManifest.xml?

The AndroidManifest.xml file acts like a contract between your app and the Android operating system. It declares the app's identity, structure, permissions, and entry points.

Basic Structure

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.app">

    <application
        android:label="MyApp"
        android:icon="@mipmap/ic_launcher">

        <activity android:name=".MainActivity" />

    </application>

</manifest>
xml

At the top level is the <manifest> tag. Inside it, you define the application and all its components.

Application Tag

The <application> tag defines global properties of your app such as icon, label, theme, and components like activities and services.

<application
    android:label="MyApp"
    android:icon="@mipmap/ic_launcher"
    android:theme="@style/Theme.MyApp">
</application>
xml

Declaring Activities

Activities represent screens in an Android app. Every Activity must be declared in the manifest for the system to recognize it.

<activity android:name=".MainActivity" />
xml

If an Activity is not declared in the manifest, the app will crash when trying to open it.

Launcher Activity

The launcher Activity is the entry point of your application — the first screen that opens when the user taps the app icon.

<activity android:name=".MainActivity">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>
xml

The intent filter with MAIN and LAUNCHER tells Android that this Activity should be shown in the home screen launcher.

Permissions

Android apps must declare permissions in the manifest before accessing sensitive device features.

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
xml

Even if runtime permission is granted, the app still needs to declare permissions in the manifest.

Services

Services are background components that run without a UI. They must also be declared in the manifest.

<service android:name=".MyForegroundService" />
xml

Services are commonly used for music playback, file downloads, location tracking, and long-running tasks.

Broadcast Receivers

Broadcast receivers listen for system-wide events such as battery changes, boot completion, or network state changes.

<receiver android:name=".MyReceiver">
    <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED" />
    </intent-filter>
</receiver>
xml

Content Providers

Content providers manage shared app data and allow other applications to securely access it.

<provider
    android:name=".MyContentProvider"
    android:authorities="com.example.app.provider"
    android:exported="false" />
xml

Application Metadata

The manifest also defines important metadata like app icon, theme, labels, and hardware requirements.

<application
    android:icon="@mipmap/ic_launcher"
    android:label="My App"
    android:theme="@style/Theme.MyApp" />
xml

Hardware & Feature Requirements

Apps can declare required hardware features so that Play Store filters unsupported devices.

<uses-feature android:name="android.hardware.camera" android:required="true" />
xml

Manifest in Modern Android

In modern Android development, the manifest is still required even when using Jetpack Compose or modern architecture patterns.

However, many configurations are now handled automatically using libraries like Hilt, Navigation, and Gradle plugins, reducing manual manifest complexity.

Why AndroidManifest is Important

The manifest acts as the central registry of your application. Without correct manifest configuration, your app cannot launch, cannot request permissions, and cannot expose components properly.

For interviews, understanding the manifest is critical because it connects Android system behavior with app-level components like Activities, Services, and Receivers.