Question

In my Travel app which depends on lot of images. I have implemented a Lazy Loader and Caching of images. In total for all the destinations the images are close to 20mb. If a User wants to download all the Images so that he can still access the app offline. How can i make sure the caching of the files work with the downloaded image files.

Was it helpful?

Solution

There are two possibilities for your app, depending on what exactly you are wanting to do. Feel free to read more about this at the Android Docs.

Internal Storage

This directory persists, and is private to your application. It might have limited space, especially for older devices.

SD Card

This will have much more space, but will be accessible to the user and other apps. You could store information in your private storage to verify the integrity of this data. You will need a permission to write to the card.

I would suggest you choose one of these two, and store your data there. This should persist from run to run. Perhaps you could even include a function that would "Pre-cache" all of the files to the appropriate folder. 20 Mb isn't really that much space, you could even include it in your app itself. It's all up to you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top