So i am trying to use Intent.ACTION_SEND
to share an image from my app.
This is the code I am using
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, shareImgURI);
shareIntent.setType("image/*");
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(Intent.createChooser(shareIntent, "Share images..."));
and the shareImgURI
is content://com.android.providers.media.documents/document/image%3A298
It opens the Chooser but when I select an option nothing happens. Am i missing something?