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

  • Home
  • SEARCH
  • 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 927045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:47:17+00:00 2026-05-15T19:47:17+00:00

I tried to set anchor tag mailto attribute like <a href=’mailto:info@company.com’>info@company.com</a> in webview. when

  • 0

I tried to set anchor tag mailto attribute like

<a href='mailto:info@company.com'>info@company.com</a>

in webview. when i run the app on simulator and click on the link it is showing “Unsupported Action ..”

How i can set mailto attribute work out in android webview….

Thanks

  • 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-05-15T19:47:17+00:00Added an answer on May 15, 2026 at 7:47 pm

    WebView does not support advanced HTML tags… what you will have to do is:

    1. Set a webclient to your webview and override the url loading
    2. When you detect a link with mailto try to send the email.

    I’m gonna give you a little snippet of code for you to have an idea. Keep in mind this is just a basic example and I can’t test it right now:

    public void onCreate(Bundle icicle) {
        // blablabla
        WebView webview = (WebView) findViewById(R.id.webview); 
        webview.getSettings().setJavaScriptEnabled(true);
        webview.setWebViewClient( new YourWebClient()); 
        // blablabla
    }
    
    private class YourWebClient extends WebViewClient {     
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            if (url.contains("mailto")) {
                // TODO: extract the email... that's your work, LOL
                String email = "";
                sendEmail();
                return super.shouldOverrideUrlLoading(view, url);
            }
            view.loadUrl(url);
            return true;
        }
    }
    

    Then, send the email:

    public void sendEmail(String email){
        final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
        emailIntent.setType("plain/text");
        emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{email});
    
        String mySubject = "this is just if you want";
        emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, mySubject);
        String myBodyText = "this is just if you want";
        emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, myBodyText);
        context.startActivity(Intent.createChooser(intent, "Send mail...));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use Html.ActionLink to return an anchor tag with href like /Product/22/Product-Name
I tried to set the usergent using Inet1.Execute , GET, Referer: yahoo.com & vbCrLf
I tried set fullScreenMode(false) for my app (LWUIT). But can not get Canvas. 1
I'd like to change the value of the onclick attribute on an anchor. I
I tried to set innerHTML on an element in firefox and it worked fine,
I tried to set the tick style to tsManual, the min and max position
I tried to set the background color of a data grid view to be
I tried to set up the date_select in my HAML template for displaying just
I tried to set up my togglebutton properties layout using style.xml. Here's my code:
I've recently tried to set my default application icon with a .ico file I

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.