I am trying to send table format in email using an Android application. I have done following things:
btnSend.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String tblOutDevices= "<html><body><table><tr><td>NO.</td><td>DEVICE NAME</td><td>USER NAME</td></table></body></html>";
Intent sendIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);
sendIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { "" });
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Test Demo");
if(Build.VERSION.SDK_INT >= 24)
{
sendIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(tblOutDevices,0));
} else {
sendIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(tblOutDevices));
}
sendIntent.setType("text/html");
startActivity(sendIntent);
}
});
But, when I check in application I cannot see table format in the body.
I have check many question related to this like: Link1, Link2, Link3, Link4 etc... But, those was too old. 2-4 year old questions and said that table format is not support. After 2 year there are many updates but, still didn't support table format? If support what is the solution for that?
Any help would greatly appreciated.