4

i am sending a simple email and in the body i put a Link .

My problem is the link is not recognize as Link but only as String

Here the code:

 intent.putExtra(Intent.EXTRA_EMAIL,new String[]{ "Support@bift.net"}); 
       Uri myUri = Uri.parse("http://www.stackoverFlow.com/");
       intent.putExtra(Intent.EXTRA_TEXT,  "Check out this great application:"+"\n"+ myUri);  
       intent.putExtra(Intent.EXTRA_SUBJECT, "Traveler's Pharmacy");
       intent.setType("text/plain");   
       startActivity(Intent.createChooser(intent, "Choose Email Client"));
       startActivity(intent);

Thanks for helping

bifko
  • 41
  • 1
  • 2

1 Answers1

10

Change this two lines:

intent.setType("text/html");  

and

intent.putExtra(Intent.EXTRA_TEXT,  
                Html.fromHtml("Check out this great application: <a href=\""+ myUri+
                "\">Link</a>"));  
Peter Knego
  • 79,991
  • 11
  • 123
  • 154