In Facebook app, for example, I login with my internet connection. Then I close the app, turn off the internet and close all my system tabs. Then even though my internet connection is off, I see the images and data that had been previously loaded still retained.
How does Facebook app do that? What should I do if wanted to implement such a feature in my Android app?
Picasso
andGlide
are two libraries that automatically cache images.Retrofit
withOkHttp
can be used to cache responses and you can always make a custom caching mechanism with local db usingRoom
– Anchovy