- Learning Concurrency in Kotlin
- Miguel Angel Castiblanco Torres
- 120字
- 2021-08-05 10:46:48
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.
推薦閱讀
- C++ Primer習題集(第5版)
- TypeScript Essentials
- Progressive Web Apps with React
- Instant Apache Stanbol
- 機器人Python青少年編程開發實例
- C#程序設計教程
- C語言從入門到精通(第4版)
- Hands-On RESTful Web Services with Go
- 名師講壇:Java微服務架構實戰(SpringBoot+SpringCloud+Docker+RabbitMQ)
- MySQL從入門到精通(軟件開發視頻大講堂)
- 51單片機C語言開發教程
- Mobile Device Exploitation Cookbook
- Learning Redux
- H5匠人手冊:霸屏H5實戰解密
- Hands-On Artificial Intelligence with Unreal Engine