user6444945 user6444945 - 1 year ago 108
HTML Question

How to embed html link in a String Android?

Hi I know how to embed a html in a string in xml.

<string name="our_policy">Our app
<a href="">Policy</a> and
<a href="">Terms</a>

But I have to add some more things into this during run time.How to embed html link in a string during run time and sent it via Intent to gmail.Any help will be appreciated and thanks in advance.

Answer Source

you can use

intent.putExtra(Intent.EXTRA_TEXT,Html.fromHtml("<a href= >Google</a>")); 

It is the better way.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download