Communicating with a remote server

There are a number of ways that communication with a remote server can be achieved in Android. Common networking libraries used across the Android community are Retrofit, OkHttp, and Volley. Each of these libraries has its advantages and drawbacks. We will be making use of Retrofit in this project, but for the sake of knowledge, we will take a look at how to communicate with a remote server using OkHttp.

Get Kotlin Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.