Take the 2-minute tour ×
mIntent = new Intent(Intent.ACTION_SEND);
mIntent.putExtra(Intent.EXTRA_SUBJECT, getString(""));

Uri myUri = Uri.parse("http://www.Google.com/");
mIntent.putExtra(android.content.Intent.EXTRA_TEXT,Html.fromHtml("<a href=\""+myUri+"\">Link</a>"));
startActivity(android.content.Intent.createChooser(mIntent, "Email:"));

I tried the above code but at receiver side I can not get Link. it convert into normal text..

share|improve this question
I copied/pasted your code and its working for me... –  ZouZou Aug 17 '12 at 10:37
Have you checked at receiver side?, OP mentioned that its not showing at receiver end. –  hotveryspicy Aug 17 '12 at 10:45
Yes I send an email to my gmail account and then check this trough the Chrome Browser and it was working. –  ZouZou Aug 17 '12 at 10:46
Can you show me some proof, as me too not getting –  hotveryspicy Aug 17 '12 at 10:49
Why do you need a porof ? Believe me, I exactly copied and pasted this and the link is working both on my computer and gmail's app for smartphone. –  ZouZou Aug 17 '12 at 10:55

3 Answers 3

up vote 8 down vote accepted

Try this one.. It is working for me..

String link_val = "www.google.com"
String body = "<a href=\"" + link_val + "\">" + link_val+ "</a>"

intent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(body));
share|improve this answer
The difference is that if we provide link and its value to the same then it is working else not i.e. <a href=\"www.example.com\">www.example.com</a> is working while <a href=\"www.example.com\">my custom text</a> isn't. –  hotveryspicy Aug 17 '12 at 11:48
I'm seeing the same behaviour, I'm guessing <a href=\"www.example.com\">www.example.com</a> is working because gmail auto converts text that starts http or www into a link. –  scottyab Dec 11 '12 at 12:26

CapDroid's answer does not look like it solves the problem, as per scottytab's comment.


yourIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(body));

If that doesn't work try adding;

yourIntent.putExtra(android.content.Intent.EXTRA_HTML_TEXT, Html.fromHtml(body));

References; fromHtml, EXTRA_HTML_TEXT

share|improve this answer

If you make the EXTRA_TEXT a full html document by enclosing the source text in <html><body> and <\body><\html> it will work properly with GMail, that is, you can have a proper description for the link.

Unfortunately, it won't work with all email apps. For example it does not work with the Samsung email app on my Galaxy S3. My conclusion is that you cannot safely do this, which is very annoying.

share|improve this answer

Your Answer


