Reputation: 2040
I want to package large number of pictures, almost 90 mb with my app.My initial implementation was to download the image whenever required but then it was causing unnecessary wait and is spoiling the experience.Is there any way to compress the app with the apk? Otherwise any suggestions from experience how to handle this situation? Also is if i ask user to download image set on sd card on first run, will i face any issues if i want to update image(i.e change some images).
Upvotes: 0
Views: 283
Reputation: 16914
First of all, you may find this Android blog post useful. You can assign huge expansion files (up to 2 GB) to you .apk, so you might as well put those images there. However, I'd certainly be upset as a user if I had to download that 90 MB again when you decide to update those images.
As an alternative, you could just .zip those images up, and if you can crank the overall app. size below the 50 MB limit, you could store it as a project asset. And you could unzip those images onto the SD card on the first run. But then again, updating the images is problematic.
Why do you consider on-demand downloading a bad approach? Your app could download those images as needed, and cache them on the SD card. You could also limit the cache size. I'd definitely go that way. Updating the images is straightforward opposed to the static way of embedding huge .zip files in your project's assets, or using expansion files.
Upvotes: 2