I want the image that the user made to be shared when he clicks on the button
the image is an image he made using many features like paint etc ..
I want when he clicks on the sharing button a sharing intent “share via.”
appears and let him choose where he wants it to be shared at
I found this code but I get an error from (path)
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
Uri screenshotUri = Uri.parse(path);
sharingIntent.setType("image/png");
sharingIntent.putExtra(Intent.EXTRA_STREAM, screenshotUri);
startActivity(Intent.createChooser(sharingIntent, "Share image using"));
How can I do this?
What do you put in the variable path?
Path is the route to the file where you have saved the bitmap previously (sdcard or internal app storage).
It’s right that the picture must be saved first, but If you are not saving it now, how do you fill path variable?