How to Add Manifest Permission to an Android Application?

An AndroidManifest.xml file must be present at the root of the project. The manifest file contains the permission, activity, services, etc. The manifest file enters the point of application to show which activity first of the project.Adding permission to the file is very important.In this article, we will learn how to add internet permissions to the Android Application manifest file.

Step-by-Step Implementation

Step 1: Create a new project in Android  or you can use an already created project.  
Step 2:  Manifest file in the app folder of the your project.


Step 2.1:  Below write INTERNET permission in manifest.xml.

  <uses-permission android:name="android.permission.INTERNET" />
Step 3:  Full code of manifest file.
 <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
<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.MyApplication"
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>

 

Happy coding!

365Bloggy June 12, 2024
Share this post
Tags
SUBSCRIBE THIS FORM


Archive