I\'m using Picasso library to download images from URL. This is my first attempt on Picasso
Scenario : I want to download some images from server and store them into a
final ImageView iv = new ImageView(context);
Picasso.with(context).load(resultImageUrl).into(iv,
new Callback() {
@Override
public void onSuccess() {
// Picasso successfully loaded image from resultImageUrl
Bitmap bitmap = ((BitmapDrawable)
iv.getDrawable()).getBitmap();
ImageStorage.saveToSdCard(context, bitmap, imageName);
onFinishDownloading(results);
}
@Override
public void onError() {
// Picasso has failed to load image from resultImageUrl
onFinishDownloading(results);
}
});