Android Kotlin: Forecast App 04 – Abstracting Retrofit Network Calls – MVVM Tutorial Course

Up until now we’ve created a Retrofit service to communicate with the weather API, we also created all of the pieces needed for a local database using the Room library. So, we basically have all of the data components of our app implemented, right? We can fetch data and then cache it locally, so all that’s left to do is to put it all in a repository to somehow centralize network and local data calls.

Well, while we’re really close to creating a repository, we still have one important step unfinished. We need to wrap the retrofit weather API service into a special class to create an abstraction and to give the code making network calls a better structure.

?Get the code from this tutorial?


Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Development made simple

We're here to help you. If you have any questions, let us know.

Copyright 2017 - 2018 Reso Coder © All Rights Reserved