This Kotlin for Android tutorial will cover how to use Android’s HttpUrlConnection API to download an image.
This does expose a problem when doing Http calls on the UI thread. And that’s where the Anko coroutine comes in.
This Kotlin on Android tutorial covers:
* How to create an Http connection using the HttpUrlConnection library
* How to download an imput stream
* What happens when you do a network call on the UI thread
* Installing the Anko library
* How to use Anko coroutines