From the course: Android Development Essential Training: Manage Data with Kotlin

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Network permissions and status

Network permissions and status

From the course: Android Development Essential Training: Manage Data with Kotlin

Start my 1-month free trial

Network permissions and status

- [Instructor] My Android App is going to acquire its data from a simple remote web service. To get started making internet requests, you'll need to first add some permissions to your manifest. And then you should always check the network status before you initialize the request. To add the permissions, I'll go to my AndroidManifest.xml file. If you're in the Android scope, it's under the manifests virtual directory. I'll add two permission requests using the use as permission element. The first will be for the internet permission. And the second one will be for something called Access Network State. These are both what are known as normal permissions. That means they're granted automatically when you install the app. That's in contrast to what are known as dangerous permissions, where the user has to explicitly grant the permissions at run time. So now with my permissions in place, I can check the current network status. There are a couple of ways of doing this and I'm going show the…

Contents