1

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.

Community
  • 1
  • 1
ketan
  • 19,129
  • 42
  • 60
  • 98
  • 1
    in the received activity, you to need set that string in webView or use Html APIs or tagHandler to set on a textview – Vinodh Dec 07 '16 at 06:52
  • @Vinodh in received activity? I am sending it to default activity. – ketan Dec 07 '16 at 11:56

0 Answers0