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

Previous

About

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:
https://gist.github.com/AkshayChordiya/15cfe7ca1842d6b959e77c04a073a98f

Comments

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

>
You need to go PRO to post comments.

Lessons in Android Architecture Components - A Deep Dive