Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9209611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:53:04+00:00 2026-06-18T00:53:04+00:00

I’m facing a problem happening on Android 4.1+ devices. I want to send an

  • 0

I’m facing a problem happening on Android 4.1+ devices.
I want to send an email (via Intent) containing html links. I know this works on android 2.x devices because I did this for months.

Here is the java code:

startActivity(Intent.createChooser(
new Intent(Intent.ACTION_SEND)            
.putExtra(Intent.EXTRA_SUBJECT, "A subject")  
.setType("text/html")
.putExtra(Intent.EXTRA_TEXT, Html.fromHtml("Some text ... <a href="http://www.weburl.com">Some text</a>)), "Email"));

On Android 4.1:
When I use this code, Gmail show the text as expected AND I SEE THE LINKS in blue an underlined. But I receive this mail without the links.

On Android 2.x:
All is perfect. I receive the email with the links

Can somebody help me to resolve this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:53:05+00:00Added an answer on June 18, 2026 at 12:53 am

    I think that the email applications don’t have full html support. I have the following code:

    Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto","", null))            
                    .putExtra(Intent.EXTRA_SUBJECT, "LIJSTJE fb")  
                    .putExtra(Intent.EXTRA_TEXT, Html.fromHtml(new StringBuilder()
                     .append("<p style='font-weight:bold;'>Some Content</p>")
                     .append("<a>http://www.google.com</a><br/>")
                     .append("<a href='http://www.facebook.com'>facebook</a>")
                     .append("<small><p>More content</p></small>")
                     .toString()));
    
                    startActivity(Intent.createChooser(emailIntent, "Send email..."));
    

    The paragraphs and new lines are added as expected. The styling however isn’t. Also when you print the full url you get a link, but when you do it like the facebook link, you don’t.

    I suspect that the email client on the phone removes styling and makes sure that links link to the visible text. So the user knows where the link goes to. Also if you think about it the native gmail app doesn’t have styling options. So this may cause the remove styling behaviour.

    At least that’s my theory. 🙂

    (NOTE: I only tested on the native gmail application!)

    Also I changed Intent type from SEND to SENDTO this way it only uses email clients and not other applications. And I removed the setType() method, because when you use it, you get an “application not found” error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I want to count how many characters a certain string has in PHP, but
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm interested in microtypography issues on the web. I want a tool to fix:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I want to show the soap response to UIWebview.. my soap response is, <p><img
I've tracked down a weird MySQL problem to the two different ways I was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.