0

I am having a stuff when displaying content in mail on Android device. Here is my case:
I need to send an invitation to other users from app. The invitation's content can be changed in the future, so I decide to make it as HTML content from server side and then send it back to client side (Android and iOS), client side will receive and send this invitation to other users via email inside device (until now it is Gmail).
Everything is ok on iOS device. I mean invitation's content is displayed as HTML file (include image, color, margin,...). But we have a problem on Android device - It can not be displayed as HTML content. Instead of that, it just display text (no image, no color).
Here is my code

Intent emailIntent = new Intent(Intent.ACTION_SENDTO,
            Uri.fromParts("mailto",sender, null));
    emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
    emailIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(content)); //content: HTML format
    context.startActivity(Intent.createChooser(emailIntent, "Send email..."));

Can someone give me some ideas on this case? If this is impossible on Android platform. Please give me a documentation on an official site (Android is the best).

Thank you very much!
Ryan

Binh Le
  • 343
  • 2
  • 10

1 Answers1

0

As per my knowledge you can't send image in body part from android device.

Please check below answer for more information.

How to add an image in email body

If you will find out any solution then must share.

Community
  • 1
  • 1
Niranj Patel
  • 32,980
  • 10
  • 97
  • 133