Work with Retrofit
While we’ve gotten away with developing offline apps so far, that’s very rarely the case in the real world. Don’t get me wrong, everything we’ve done so far is valuable (both here and with Penny Drop), but calling APIs is a critical piece of building an app.
If you’re not familiar, Retrofit[9] is an open source library created by Square, Inc.,[10] and has become a de facto “official” Android library—so much so that the official Google tutorials use Retrofit for any API calls.
I’m going to cover the basics with setting up a Retrofit service here. If you’re more interested in just using the service rather than building it, skip ahead to the next section: Add the ABL API Client. We’re going to be using the ABL API client for ...
Get Kotlin and Android Development featuring Jetpack 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.