I want to view and share an image with 2 Intents, this is my code:
Intent IntentView = new Intent(Intent.ACTION_VIEW);
IntentView.setDataAndType(Uri.fromFile(imageFile), "image/jpg");
Intent IntentShare = new Intent(Intent.ACTION_SEND);
IntentShare.setType("image/jpg");
IntentShare.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(imageFile));
IntentShare.createChooser(IntentShare, "Share with:");
Intent[] TwoIntents = {IntentView, IntentShare};
CurrentActivity.startActivities(TwoIntents);
"CurrentActivity" comes as an argument to the method and "imageFile" is a File object.
Unfortunately the image does not show it, only the chooser appears and until the sharing activity is finished, the image appears.
How can I do it?
Thank you very much for your help.
Regards!