Question

I wish to make option to share an image to all possible option. eg. mail, WhatsApp, Facebook etc. and I wish when the user share it there will be text addition. For example in Gmail I wish to add headline to mail before sending it, on Facebook also I would like to add text to the image. Do I need to add API to my app? Can you point me to the right direction with this.

Was it helpful?

Solution

First save the image to your SD card and then use the ACTION_SEND Intent.

http://developer.android.com/reference/android/content/Intent.html#ACTION_SEND

Intent share = new Intent(android.content.Intent.ACTION_SEND);
share.setType("image/*");
share.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + pathToFile));
ctx.startActivity(Intent.createChooser(share, "Share image")); //edit text shown in dialog here
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top