Popular

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 transformations (map, switchMap and MediatorLiveData), handling events and building reactive architectures as well as common antipatterns and code-smells to avoid.

Links:
LiveData blogs → http://bit.ly/2PUpnWd
Samples → http://bit.ly/2qzKbDN
I/O app → http://bit.ly/2Ov1Vd3

Presented by: Jose Alcérreca & Yigit Boyar


Android Dev Summit '18 all sessions playlist → http://bit.ly/ADS18-Sessions
Subscribe to the Android Channel! → http://bit.ly/AndroidDevs1

#AndroidDevSummit"

Comments
  • Ioane Sharvadze
    Ioane Sharvadze 7 месяцев назад Very good points in this talk! It's interesting to see when one can use Coroutines Channel API and when LiveData.
  • B Wally
    B Wally 2 месяца назад Hi every one i don't understand transformation map switch it s behind the scene what happened in android studio! thanks
  • OmParkash Jangra
    OmParkash Jangra 5 месяцев назад all game play with my Ricavryi pay open Karo
  • Amir Khan
    Amir Khan 6 месяцев назад that awesome..
  • Sieński Witold
    Sieński Witold 7 месяцев назад Complete presentation :)
  • Tarry Masters
    Tarry Masters 7 месяцев назад The Android is a tool?
  • Kassadin Orz
    Kassadin Orz 7 месяцев назад the library has million transformations means ?
  • Maciej Tomczyński
    Maciej Tomczyński 7 месяцев назад I guess he was referencing Rx transformations
  • SnoopyDoo
    SnoopyDoo 5 месяцев назад Stick with RxJava.
  • Tarry Masters
    Tarry Masters 7 месяцев назад Developers where else are we, me or I?
  • Ali Kazi
    Ali Kazi 3 месяца назад Very good summary of the new MVVM!
  • Otis Chen
    Otis Chen 7 месяцев назад (изменено) 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?
  • Zhuinden
    Zhuinden 5 месяцев назад (изменено) What? No, by scaling they meant that "scaling it beyond the responsibility it was designed for", namely holding the last value and providing it to the observer (Activity/Fragment). So like, don't try to model network requests with LiveData with some kind of LiveDataCallAdapter because why would you even do that
  • Jose Alcérreca
    Jose Alcérreca 7 месяцев назад Yeah, LiveData was designed for View-ViewModel. Transformations were added for simple combination of LiveDatas. If you are trying to combine dozens of data sources with different lifespans you might to look at something else.
  • zztop3000
    zztop3000 6 месяцев назад Is there a java version?
  • Areeb Jamal
    Areeb Jamal 6 месяцев назад Every Jetpack library except kotlinx is written in Java, and even if it was written in Kotlin, it would be Java interoperable. That's the whole point of Kotlin
  • Tarry Masters
    Tarry Masters 7 месяцев назад We are always developing.
  • Chris Banes
    Chris Banes 7 месяцев назад Always.
  • Mostasim Billah
    Mostasim Billah 7 месяцев назад How can I get the slide?
  • CPP.MASTER
    CPP.MASTER 7 месяцев назад Take a screenshot of every frame
  • Hai Huang
    Hai Huang 7 месяцев назад LiveData
  • Jose Alcérreca
    Jose Alcérreca 7 месяцев назад LiveData! 👍
  • Tarry Masters
    Tarry Masters 7 месяцев назад 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.
  • Mujtaba Mahmood
    Mujtaba Mahmood 5 месяцев назад You can imagine now how things can get so confused on a job interview when someone confuses exactly the same way these two nerds just did. Typical Google interviewers!
  • WatfordJC
    WatfordJC 4 месяца назад 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.
  • Kevin M
    Kevin M 2 месяца назад Wow... 1st Kotlin is not complicated at all, give it the good ol' college try. Hearing you complain about it lack the useless verbosity of Java shows me you haven't given it a fair chance. 2nd Jesus H Chris if you are still using AsyncTask to handle IO operations you are years behind on android best practices... Please do some googling and you will find possibly hundreds of articles about why you should ditch AsyncTask If you are actually a professional android developer and harboring these views, I might have a heart attack
  • Mukunda KN
    Mukunda KN 7 месяцев назад 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.
  • Kyle Falconer
    Kyle Falconer 3 недели назад Google has said (as of 2019) that they're going to be using Kotlin as the primary language for Android. You should expect this going forward. It's not going away.
  • Zhuinden
    Zhuinden 5 месяцев назад Kotlin fits much better on slides, it's easier to just learn how to read Kotlin.
  • Jobin Sabu
    Jobin Sabu 7 месяцев назад Why are they using kotlin code and not java
  • BoxingHacker
    BoxingHacker 5 месяцев назад @zztop3000 it's fun until you get a lawsuit from Oracle😭
  • Zhuinden
    Zhuinden 5 месяцев назад @zztop3000 try it yourself it's `fun` it's a keyword so you know it's true
  • MJames Montes
    MJames Montes 6 месяцев назад (изменено) then have fun dealing with Null Exception
  • zztop3000
    zztop3000 6 месяцев назад @Sachin Kumar It can't be, it's godawful. Java is king!
  • Sachin Kumar
    Sachin Kumar 7 месяцев назад Because kotlin is the future of Android.
  • Tarry Masters
    Tarry Masters 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.