Very nice article, thank you for writing this. I need some help though: My use case is that I need to show the presisted data( if it is there otherwise just show a loading screen) as soon as the user opens the activity and start a fresh request, and if the fresh data request completes without any errors, persist that data and then update the UI. How do I achieve this with NY times store?

Software Engineer @Zomato. Passionate about tech, music, movies, gaming, coffee and food! Find my writing at https://www.chaddha.me/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store