官术网_书友最值得收藏!

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.
主站蜘蛛池模板: 牙克石市| 琼海市| 明溪县| 天祝| 温宿县| 蒙自县| 临沧市| 弥渡县| 平原县| 衢州市| 施甸县| 丰顺县| 安庆市| 长子县| 潢川县| 霍城县| 城口县| 辉南县| 富民县| 陆河县| 仲巴县| 泰来县| 郑州市| 曲靖市| 乌鲁木齐县| 安岳县| 台中市| 榆社县| 苏尼特左旗| 桂林市| 元阳县| 石阡县| 韶山市| 高青县| 乐都县| 灵台县| 南投县| 手机| 娱乐| 贵定县| 旺苍县|