Search code examples
javaandroidimagesqliteandroid-download-manager

Android best practice - download pictures


How would you approach this problem:

My app should download different packages of pictures (containing up to 300 pngs, each about 20 kb) and store the pictures on the phone, so i can display them.

I want to upload the pictures somewhere online, so I can change them every time and the user can enjoy the newest pictures. (I upload the pictures not with the app) I read that storing them in a sqlite db isn't the best option.

At the moment I am storing the pictures in the app, but then I don't know how I can upload and replace pictures on all apps immediately without the need of updating the whole app.

I don't need code or stuff, so don't waste your precious time on that, just some general hints where and how you would store the pictures online, and how android can download the pictures easily.


Solution

  • Take a look at the Glide or Picasso libraries. Those are super easy to use for thread-safe downloading of images.

    Personally, I just fetch/store the images on imgur.

    If you want to upload a dedicated databse, you'll have to set one up. Some common ones are Amazon, Google, etc. There are tons.