BaseMVVM is the Android project that showcases the MVVM architecture in the basic scenario of fetching the list of books data from the mocked REST API service and caching it in the Room database.
- Dagger 2.28
- RxJava 2.2.9
- Room 2.2.0
- Retrofit 2.9.0
- Activity injects the ViewModel and starts observing ViewModel's LiveData
- ViewModel fetches books from the Repository and observes it by RxJava
- Repository tries to fetch data from the ApiService by RxJava
- onSuccess - Repository caches data into the Database
- onError -- Repository loads cached data from the Database
- ViewModel updates LiveData with the response from the Repository
- Activity shows the response by RecyclerViewAdapter