It is necessary to save either six images on the phone’s memory or on the SD card. They are downloaded from the internet. To download using Picasso. I am trying to create a new image file through Target, and then output it. Here is the code:
Picasso.with(this).load(image_ar.get(0)).into(new Target() { @Override public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) { Log.e("tag", "Picasso > onBitmapLoaded"); File file = new File(Environment.getExternalStorageDirectory().getPath() + "/name.jpg"); //путь к изображению FileOutputStream out; try { out = new FileOutputStream(file); bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out); out.close(); } catch (IOException e) { e.printStackTrace(); } Picasso.with(getApplicationContext()).load("file:///" + file.getPath()).into(image.get(0)); } @Override public void onBitmapFailed(Drawable errorDrawable) { Log.e("tag", "Picasso > onBitmapFailed"); } @Override public void onPrepareLoad(Drawable placeHolderDrawable) { Log.e("tag", "Picasso > onPrepareLoad"); } }); But as a result, I do not get anything.