0

I want to be able to share a content from my Android app, like this template :

This is some text (mainly a description about the image shared)

The Image

Shared via MyApp

I currently use this code snippet :

                Intent share = new Intent(Intent.ACTION_SEND);
            share.setType("image/*");

            Uri imageUri = Uri.parse("android.resource://" + path);
            share.putExtra(Intent.EXTRA_TEXT, "A description about the image below");
            share.putExtra(Intent.EXTRA_STREAM,imageUri);
            share.putExtra(Intent.EXTRA_TEXT, "Shared via MyApp");
            startActivity(Intent.createChooser(share, "Choose a share option"));

Only the second putExtra is added to the share.

How can I do this task ?

Thank's a lot.

Edit : My question is different from How to Share Image + Text together using ACTION_SEND in android? I know how to share a text and an image together, but i want to add a text before, and another text after the image.

Community
  • 1
  • 1
Rems
  • 119
  • 8
  • Possible duplicate of [How to Share Image + Text together using ACTION\_SEND in android?](https://stackoverflow.com/questions/20333186/how-to-share-image-text-together-using-action-send-in-android) – Harry T. May 07 '19 at 08:08
  • No. This post explain how to share an Image plus a single text. I a m able to do that, but read my question : I want to add : a text - an image - another text. – Rems May 07 '19 at 08:41
  • This is not possible .`EXTRA_TEXT` does support HTML but not all apps render HTML.. Only Solution can be you send a Complete Image which includes Text Inside it .. Probably a Drawing Cache of a `View` .. – ADM May 07 '19 at 08:46

0 Answers0