Reputation: 1447
I need a way to download roughly 500 images dynamically, and make them available for offline use. There are no use for there images in other applications, so I would like them to be hidden from the user. I want them to be in the drawable
folder, except I want the app to put them there.
Is this possible? If not, what is a better option?
Upvotes: 0
Views: 600
Reputation: 1006849
I want them to be in the
drawable
folder, except I want the app to put them there. Is this possible?
Assuming that you mean you want them to be drawable resources, that is not possible. Resources are set at compile time and cannot be modified at runtime.
If not, what is a better option?
If these images are all very tiny -- say, less than 1MB combined -- download them to internal storage (e.g., getFilesDir()
). Otherwise, download them to external storage (e.g., getExternalFilesDir()
), particularly on Android 1.x/2.x devices, so you do not consume an excessive amount of internal storage.
Upvotes: 2