The most straightforward way of doing this is to save the image to SD and then use an Intent to open the default gallery app.
Since you're already using Picasso, here's a way to do it using that lib:
private Target mTarget = new Target() {
@Override
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
// Perform simple file operation to store this bitmap to your sd card
saveImage(bitmap);
}
@Override
public void onBitmapFailed(Drawable errorDrawable) {
// Handle image load error
}
}
private void saveImage(Bitmap finalBitmap) {
String root = Environment.getExternalStorageDirectory().toString();
File myDir = new File(root + "/saved_images");
myDir.mkdirs();
Random generator = new Random();
int n = 10000;
n = generator.nextInt(n);
String fname = "Image-"+ n +".jpg";
File file = new File (myDir, fname);
if (file.exists ()) file.delete ();
try {
FileOutputStream out = new FileOutputStream(file);
finalBitmap.compress(Bitmap.CompressFormat.JPEG, 90, out);
out.flush();
out.close();
} catch (Exception e) {
e.printStackTrace();
}
}
Target
is a class provided by Picasso. Just override the onBitmapLoaded method so that it saves your image to SD. I provided a sample method for saveImage for you. See this answer for more info.
You'll also need to add this permission to your Manifest:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />