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>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>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" />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>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" />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" />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>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" />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" />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" />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.