- 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.
推薦閱讀
- Modular Programming with Python
- 嵌入式軟件系統測試:基于形式化方法的自動化測試解決方案
- C# Programming Cookbook
- 深入淺出Prometheus:原理、應用、源碼與拓展詳解
- Visual Basic程序設計(第3版):學習指導與練習
- 新編Premiere Pro CC從入門到精通
- Bootstrap Essentials
- Monitoring Elasticsearch
- ArcGIS By Example
- 零基礎學Python網絡爬蟲案例實戰全流程詳解(高級進階篇)
- NGINX Cookbook
- Babylon.js Essentials
- Python語言實用教程
- Natural Language Processing with Java and LingPipe Cookbook
- Kubernetes進階實戰