i’m using HttpImageSource for loading pictures from the internet into the app, which works fine.
I also checked the thread How to cache an Image that was previously downloaded on here. But the claim that images don’t have to be re-downloded doesn’t seem to be always true.
A bit more detail:
An image is downloaded and shown by the app and the cacheDirectory of the app increases by nearly the same amount of the filesize of that image. So i assume that the image is cached there (which might not be true).
Anyway, for as long as the app is running the image won’t be downloaded again indeed, that part works fine.
If the app stops running and is reopened, you will have to re-download the images again. At least my phone, which is the OnePlus One (Android), doesn’t show pictures anymore after the app stopped - yet the cacheDirectory size is still the same.
So the questions i have are:
Do images really get cached in the cacheDirectory or are they only available in the runtime-memory?
And if images are stored in the cacheDirectory, why can’t they be reloaded once the app stopped?
Or to break it down into a Yes or No question: Do i have to write my own caching for images in order to make the caching permanently?