- 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.
推薦閱讀
- 從零開始構(gòu)建企業(yè)級RAG系統(tǒng)
- PyTorch自動駕駛視覺感知算法實(shí)戰(zhàn)
- NLTK基礎(chǔ)教程:用NLTK和Python庫構(gòu)建機(jī)器學(xué)習(xí)應(yīng)用
- C語言程序設(shè)計(jì)實(shí)訓(xùn)教程
- 面向?qū)ο蟪绦蛟O(shè)計(jì)(Java版)
- SQL Server 2016數(shù)據(jù)庫應(yīng)用與開發(fā)習(xí)題解答與上機(jī)指導(dǎo)
- SQL Server 2016數(shù)據(jù)庫應(yīng)用與開發(fā)
- Learning Zurb Foundation
- Python算法從菜鳥到達(dá)人
- Learning Concurrent Programming in Scala
- Learning Probabilistic Graphical Models in R
- 區(qū)塊鏈技術(shù)進(jìn)階與實(shí)戰(zhàn)(第2版)
- Python機(jī)器學(xué)習(xí)之金融風(fēng)險管理
- Python入門很輕松(微課超值版)
- 進(jìn)入IT企業(yè)必讀的324個Java面試題