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

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.
主站蜘蛛池模板: 桦南县| 固镇县| 搜索| 黄冈市| 会理县| 双桥区| 海城市| 曲松县| 泉州市| 元谋县| 台湾省| 定远县| 谢通门县| 威远县| 大名县| 抚顺市| 泉州市| 博乐市| 井陉县| 扎赉特旗| 钟山县| 广水市| 沁阳市| 金溪县| 望江县| 凤山市| 开阳县| 苍溪县| 连江县| 张家川| 洱源县| 河间市| 苗栗县| 米易县| 灵寿县| 武山县| 讷河市| 遂溪县| 莫力| 敦煌市| 文昌市|