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