Kotlin on Android development: Image download & display using HttpUrlConnection & Anko coroutines
1,612 views · Published 9 February 2018 · 17:43 · Indexed 21 September 2026
Channel: Mobile Application Tutorials · 2018 · Education
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 * Setting up weak references to activity objects The full post can be found here https://goo.gl/DkH6b5 Image Library Series: 1 - Picasso https://goo.gl/Sioz3S 2 - Glide https://goo.gl/EWuUqV 3 - Volley https://goo.gl/hpAgMj 4 - OkHttp https://goo.gl/7HU4bp 5 - HttpUrlConnection with Anko Coroutine https://goo.gl/DkH6b5 6 - Image Resize https://goo.gl/g4JfRG (Premium) Sign up for the professional membership plan for unlimited access to all the premium ad-free tutorials for $10.00 a month here https://goo.gl/bVAVRX Site Series: https://goo.gl/gSeQfG YouTube Playlist: https://www.youtube.com/playlist?list=PL9jCwTXYWjDLdF437RyvxQd1DfflS_7lo For business inquiries, you can contact me at my site https://goo.gl/oYB4Ln For any technical questions I provide paid consultancy here https://www.codementor.io/mobapptuts Members of the professional plan can also post questions on the forum here https://goo.gl/gpEmLC For questions, training and consultancy support I can be contacted here https://goo.gl/HEZsX1 For much more information check out Website - https://www.mobapptuts.com Codementor - https://www.codementor.io/mobapptuts Twitter - https://twitter.com/MobAppTuts Facebook - https://www.facebook.com/nigeapptuts Google+ - https://plus.google.com/b/115884642086760882044 Pinterest - https://www.pinterest.com/mobapptuts/