I want to share an image which is fresh created and therefore unsaved. It's stored in a Bitmap
object. In the send binary content article you need to have an URI to the image:
shareIntent.putExtra(Intent.EXTRA_STREAM, uriToImage);
But is it somehow possible to share the image without saving it first?
You can use this code:
But if you want to share via popular apps, like Instagram, as I know they are trying to parse
Uri
but not getting theByteArray
, and you will receive exceptions from apps.