Fun with LiveData (Android Dev Summit '18)

LiveData is a simple observable data holder that is aware of the lifecycle of the observers. It was designed to avoid memory leaks and null pointer exceptions between an activity or fragment and a ViewModel.

However, you can also use LiveData beyond the ViewModel. Components like Room or Workmanager also expose LiveData observables, and you can make your own data sources lifecycle-aware.

In this talk, we’ll deep dive into patterns with LiveData such as the different types of…


  1. Why the hell is nothing about Transformations in Android Architecture Guide?

    Edit: Never mind. I posted this before watching. After watching, the Transformations is lackluster and cumbersome. Better have your repositories return RxJava Observables, and convert them to LiveData in the ViewModel constructor with LiveDataReactiveStreams

  2. I don't understand why Google making observable so complicated using LiveData and etc.. Look at C# WPF , how easily they were implemented this MVVM pattern. Even Xamarin supports such a observable design pattern without any hurdle. But, Google is messing this up with many complicated API.

    How this ViewModel works with Databinding concept ?

  3. Helloo i have one question.,
    What is the need of ViewModel if we can handle configuration changes by writing a single line of code in manifest file i.e configurationChanges”orientation|keyboardHidden”..

  4. Hi every one i don't understand transformation map switch it s behind the scene what happened in android studio! thanks

  5. Telling me loaders are deprecated, and then only using Kotlin to try and explain LiveData, means I can't comprehend LiveData. I will never understand Kotlin because it removes all the syntax and clues my ASD brain needs to work out what code is doing, meaning unlike C, Java, JS, C#, Python, PHP, etc. I cannot make any sense of what the meaningless gibberish on the slides is trying to describe.

    Use pseudocode in your next talk if you think the subject is important enough to be understood by all, because Google has done a crap job at explaining why l should no longer use an AsyncTaskLoader to load JSON over HTTPS that must not be stored or cached.

  6. They are using Kotlin everywhere. I get that because they provided the first class support. But that doesn't mean to ignore the Java right? I am a Java developer and when they use Kotlin tool for explaining stuff, I get bored. I just don't understand the flow of Kotlin, it's just not easy to read. At least they should use both Java and Kotlin in these kinds of presentation. So many peoples are still depending on Java and Google should not act like they don't care about Java developers.

  7. google is attempting me to upgrade for my photos, for a profit most are those I had received from you tube, i am only taking a few photoes and had not descivbed theem.

  8. So simply I got confused. If only a written text or a step procedure for tose of us whot are required to set up for the program on a seperate page, which hearing or language program to allow viewing every page.

  9. Subtitle says "If you try to scale, it is just not going to work" at 18:18. Is that means livedata can not handle UI very well when the scale is big?

  10. Very good points in this talk!
    It's interesting to see when one can use Coroutines Channel API and when LiveData.

Leave a Reply

Your email address will not be published. Required fields are marked *