Adding networking permissions

Android requires applications to explicitly request permissions in order to access many features. This is done in order to present the user with an option to deny specific permissions, and prevent applications from doing something different from what the user expects.

Since we will be doing network requests, we will need to add the internet permission to the manifest of the application. Let's locate the AndroidManifest.xml file in the app/src/main directory, and edit it:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.starcarr.rssreader">
<uses-permission android:name="android.permission.INTERNET" />
<application
...
</manifest>
The name Internet is not accurate. This permission is needed in order to do any network request regardless of it actually reaching the internet – for example, it could be a LAN request. This permission has to be thought of as Networking.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.93.12