If your application requires internet connection then you need to add permissions to the manifest file AndroidManifest.xml. If you don't do this then your app may crash throwing an exception.
Steps to Add Internet Permissions to Manifest file
Locate your AndroidManifest.xml file in your project folder,
Now you can see tabs at the lower side of the Manifest, click on Permissions,
Now click on "Add" to add a new element to manifest file.
Select User Permission,Now you would see Name filed, select: android.permission.INTERNET, You can leave the Max SDK version as blank, but you can set a max API level as say 5.
Now if you see the XML view, you would see, <uses-permission android:name="android.permission.INTERNET" /> being added below user-sdk tag.<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.internetEg"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
- appcompat_v7 errors after updates to API level 21 Material Theme
- adb: The Android Debug Bridge and Commands
- The Android Virtual Device myEmulator is currently running an emulator and cannot be deleted.
- How to make TextView Text Transparent [Android]
- Android is starting optimizing... app 1 of 1
- How to make Text in TextView bold and italic in Android
- Android Development - How to switch between two Activities
- Android : IOException: Unable to open sync connection!
- Android Toolbar example with appcompat_v7 21
- How to Change Android Title Bar Color?
- How to Add Padding to Android TextView
- JavaScript : redirect page to other url
- Programmatically Send an Email from Android App using Intent
- What is Android Toast.LENGTH_SHORT and Toast. LENGTH_LONG durations
- [Soluiton] You already have the latest version of Android Studio installed
- Detect swipes on Android Activity
- Add Buttons at the bottom of Android Layout xml file
- Android Lint app_name is not translated in af (Afrikaans) am (Amharic) ar (Arabic) bg (Bulgarian)
- Hide Navigation Bar from Android Screen Activity
- Android Disable EditText from Auto Focus on Activity load
- Toast not getting displayed Android App
- How to Enable Developers Option in Android Phones Settings
- Android : Duplicate registration for activity com.example.abc
- Android ListView turns Black or Flickers while Scrolling
- Android Studio Ctrl Shift o auto import not working
- Validate email address in Python using regular expression (regex) - Python
- How to Setup AWS Credentials using Visual Studio Code - AWS
- Which Python version is bundled with macOS Sonoma 14 by default - MacOS
- Nano Show Line Numbers - Linux
- How to Know the Line Number on Windows Notepad App - Windows-11
- [Fix] Springboot: Web application could not be started as there was no ServletWebServerFactory bean defined in the context. - Java
- macOS 13 Ventura - The New About this Mac Window - MacOS
- Java 8: Find the Max value in a List - Java