jeudi 21 mai 2015

How can I implement italic HTML format of text in Android in Yahoo email client, or native mail client

I have to implement a text in italic, so I have used HTML formatting. In gmail app it works fine but in native mail client, yahoo mail app, or outlook, I cant see italicised text.

below is the sample code:

 Html html = null;
            Intent i = new Intent(Intent.ACTION_SEND);
            i.setType("text/plain");
            i.putExtra(Intent.EXTRA_EMAIL  , new String[]{"konypsteam@gmail.com"});
            i.putExtra(Intent.EXTRA_SUBJECT, "testMail");
            //i.putExtra(Intent.EXTRA_TEXT   , html.fromHtml(body));
            i.putExtra(android.content.Intent.EXTRA_TEXT, html.fromHtml(body));
            try { 
                startActivity(Intent.createChooser(i, "Send mail..."));
            } catch (android.content.ActivityNotFoundException ex) {
                Toast.makeText(MainActivity.this, "There are no email clients installed.", Toast.LENGTH_SHORT).show();
            } 

Any help?

Aucun commentaire:

Enregistrer un commentaire