I would to share a picture to other app.I am viewing the image now through get it by intent from other activity. by this code I get image:
final String imageurl = i.getStringExtra("Image");
And I viewing by Picasso:
Picasso.get().load(imageurl).into(prImg);
Now the question is how to share the displayed image to different applications through the following code:
// Share image
private void shareImage( ) {
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
sharingIntent.setType("image/*");
sharingIntent.putExtra(Intent.EXTRA_STREAM, imageUri);
startActivity(Intent.createChooser(sharingIntent, "Share Image Using"));
Or I have to use other code to do it?