Consider using Picasso for your purpose. I use it in one of my projects. To save the image to an external drive, you can use the following:
Picasso.with(mContext) .load(ImageUrl) .into(new Target() { @Override public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) { try { String root = Environment.getExternalStorageDirectory().toString(); File myDir = new File(root + "/yourDirectory"); if (!myDir.exists()) { myDir.mkdirs(); } String name = new Date().toString() + ".jpg"; myDir = new File(myDir, name); FileOutputStream out = new FileOutputStream(myDir); bitmap.compress(Bitmap.CompressFormat.JPEG, 90, out); out.flush(); out.close(); } catch(Exception e){
Here you can download this library.
source share