Manifest File

Learn about the Android manifest file to provide the necessary app information to the Android OS.

We'll cover the following

We register information on activities in the manifest file of our app to use them and manage their lifecycles. The Android manifest file is an XML file that provides essential information about an app to the Android OS. This file must be present in the root directory of every Android app’s project. The manifest file contains information about the app’s permissions and app components.

Purpose

The manifest file has several purposes, such as:

  • It declares the app’s package name, version, and any necessary permissions required by the app.

  • It defines the app’s components and their properties, such as the entry point activity, services, broadcast receivers, and content providers.

  • It specifies the minimum and target SDK versions required by the app.

  • It defines the app’s hardware and software requirements, such as screen orientation, supported device configurations, and required features.

  • It provides metadata about the app, such as the app’s name, icon, and theme.

The manifest file is mandatory for the Android OS to correctly install and run the app. During the installation process, the Android OS uses it to determine the app’s requirements and capabilities.

Sample

Here’s a sample Android manifest file in XML:

Get hands-on with 1400+ tech skills courses.