Sign in Go Pro

Android Architecture Components - A Deep Dive

Extending LiveData

This lesson is for PRO members.

Upgrade today to get access to all the PRO lessons.

Unlock this lesson

Up next



Mostly we directly use LiveData. But sometimes we need more control like knowing if there are any active observers listening to changes in data, this is useful when you want to listen to location or sensor updates.

In this lesson, we will build an application which shows the value via the proximity sensor and also automatically updates the UI when the value changes in a life-cycle aware fashion by using SensorLiveData class which extends LiveData to achieve instant UI updates in life-cycle aware fashion.


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