Sign in Go Pro

Android Architecture Components - A Deep Dive

LiveData with Retrofit

This lesson is for PRO members.

Upgrade today to get access to all the PRO lessons.

Unlock this lesson

Up next



Retrofit is the de-facto library for networking on Android. By default Retrofit returns a Call<T> but when working with Architecture Components, we require it to return LiveData<T> type.

In this lesson
- We will see how to add LiveDataCallAdapter and LiveDataCallAdapterFactory to get LiveData<T> instead of Call<T> as return type from Retrofit services.
- When it's useful to return LiveData

Get the LiveDataCallAdapter and LiveDataCallAdapterFactory:


There are no comments on this lesson, start the conversation below ...


Lessons in Android Architecture Components - A Deep Dive