Android Networking with Coroutines and Retrofit

Recently I’ve been reading up on, watching talks on and been generally getting more curious about Kotlin coroutines. Now that they are stable with the release of Kotlin 1.3 it felt like about time to start diving in an play with converting my existing RxJava code over to using coroutines. In this post, we’re going to focus on how we can take an existing network request flow and convert it over to using coroutines instead of RxJava. Now to be honest, before I got into the practical side of coroutines I thought there were going to be a lot of…

Exploring KTX for Android

Yesterday Google announced android-ktx, which is a set of Kotlin extensions for Android app development. It looks like the aim of the library is to continue with the advantages that kotlin brings to our project — less code, more fun and a simpler to understand project. Now, the library is only in preview so it is likely to change — it will probably up offering more capabilities when it is released. I’ve written this article whilst looking through the documentation for KTX and thought I’d write some notes on it as an overview. It’s likely you will just use the documentation when it comes…