Native Mobile App Development With Java

Android Manifest

15-Sep-2024

Understand the purpose of the Android manifest file and how to configure permission, components, metadata

The AndroidManifest.xml file is an important component of an Android application.


Here is the tutorial for Kotlin



It provides important information about your app to the Android system and ensures proper execution and integration of your app with the operating system.
Here are some key elements and attributes typically found in an AndroidManifest.xml file:



Contains information about the application, such as its icon, label, and theme. It also includes components like activities, services, and receivers.



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<!-- All Permission here-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.NewTestProject"
tools:targetApi="31">
<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>
</application>

</manifest>


These are just some examples.
The AndroidManifest.xml file may contain additional elements and attributes depending on your application's needs.
It serves as an important configuration file that defines the structure and behavior of your Android app.


Comments