Android: Repository Pattern Retrofit 2 and RxJava 2 (and Room..)
6 min readOct 25, 2017
So I wanted to add offline view-ability of data to my app. Arguably the most popular way to go currently seems to be the repository pattern (or a variation of it…). There are a whole bunch of (blog)posts out there, but so far I hadn’t found any that covers all the details for what I required in my use case.
So what did I need?
- Whenever I request data I want my data layer to make an api call to get me the latest up-to-date data.
- If for some reason the api call takes to…