This course is available as part of the raywenderlich.com Professional subscription. To learn more click here

Retrofit and Coroutines

Pro

Sep 1 2020 · Video Course (17 mins) · Intermediate

The old way of making network calls with Retrofit utilizes callbacks. In this course, learn how to greatly simplify Android networking code with an app that retrieves and displays a list of GitHub repositories.

1.3/5 4 Ratings

Version

  • Kotlin 1.3, Android 6.0, Android Studio 3.5.3

Retrofit

Use Retrofit

2:01 Free

Review retrofit and what related libraries can be used for data conversion. Then, add the necessary dependancies to the Gradle and synchronize the project.

1

Set up an interface that lets Retrofit connect to the GitHub API.

2

Create a class to implement the Github service and use it to fetch data.

3

Make a retrofit network call the old way using callbacks.

4

Coroutines

Learn how coroutines make asynchronous code read like synchronous code. Understand how coroutines handle threading for you and coroutine scope.

5

Update the traditional Retrofit code from the previous episode to instead use coroutines.

6

Who is this for?

Developers who want to use the modern approach of writing asynchronous network calls. It expects you to be familiar with Android Studio and Kotlin programming. Familiarity with Retrofit would be helpful but is not required.

Covered concepts

  • Retrofit networking library
  • Using coroutines with Retrofit to make network calls.
  • Converting callback style code to coroutines

Contributors

Comments