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

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.
主站蜘蛛池模板: 南充市| 台南县| 淅川县| 腾冲县| 长丰县| 文安县| 浦北县| 饶河县| 托克逊县| 从化市| 准格尔旗| 陇川县| 错那县| 拜泉县| 靖西县| 蒙城县| 广安市| 游戏| 寿宁县| 岐山县| 张家口市| 双桥区| 湛江市| 金堂县| 宜兰市| 濉溪县| 德江县| 泊头市| 本溪市| 融水| 阿克苏市| 观塘区| 祥云县| 谷城县| 方城县| 景德镇市| 乐昌市| 通渭县| 威海市| 高碑店市| 兴义市|