- Google Developer Expert in Android - Over 8 years experience in Android - Open Source Contributor - Technical Blogs & Books Writer - Love to share my knowledge with others Follow me on Twitter @WajahatKarim | wajahatkarim.com This is Wajahat Karim
LiveData 1. An Observable with LifeCycle ability 2. Instantly notifies the changes in the data to the UI Observes for updates LiveData value updates Notifies the observer Update the UI STARTED Or RESUMED?
ViewModel 1. Middle man for View & Model 2. Decouples data from the view to survive the configuration changes 3. Never put the references to “Context” or “View” inside the ViewModel
Finally, the Architecture All the UI related stuff Holds data required by UI and survives configuration changes Responsible for providing data to ViewModel Data sources (or model) such as database or from the server