We want to make our users not to wait for loaded data from the Internet. We want to present cached data (locally stored data on the device) immediately after the user launches the app.
Behind the scenes (using coroutines), we will be fetching data from the Internet and update the local database (cache) - Single Source of TRUTH.
Then, we are going to use LiveData to update the UI accordingly.
It makes a lot of sense, let me know what do you think about this approach. How do you feel looking the loading icon of the app for 10 - 30 seconds and nothing showed up?
#Kotlin #Android #KotlinEverywhere