Yuan
Yuan

Reputation: 117

Android Studio - Asynctask

I'm really new to Android Studio,

I'm facing some problem of Asynchronous Task to download multiple of images from my database through PHP. For example, I would like to download 50 images from database and I started the AsyncTask, however in the middle (let say image 38th), internet connection disconnected, seconds later, internet connection connected back. How am i gonna to tell my apps to start download image 38th till 50th? Is there anyway of doing this? i'm using ListView & BaseAdapter to show my images.

Please help~

Upvotes: 0

Views: 49

Answers (1)

Dany Pop
Dany Pop

Reputation: 3648

Have a look at Picasso Library

http://square.github.io/picasso/

It works like this :

Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);

It works with a cache, so images that have already been loaded won't be downloaded twice

Upvotes: 1

Related Questions