Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

WebView page not available

$
0
0

I am using a webview to display a webpage and that all works.

Within these page there are phone numbers and email addresses.

However when we click on "tel/email" within the page we get

WebPage no available
the web page at tel:00830434343 could not be loaded because
net::ERR_UNKNOWN_URL_SCHEME

<WebView x:Name="webView" VerticalOptions="FillAndExpand" 
              Source="{Binding Url}"
              Navigated="WebView_OnNavigated"
              HorizontalOptions="FillAndExpand">
     </WebView>      

    private void WebView_OnNavigated(object sender, WebNavigatedEventArgs e)
    {

        if (e.Url.ToLower().StartsWith("tel:"))
        {
            Xamarin.Essentials.PhoneDialer.Open(e.Url);
        }
        else if (e.Url.ToLower().StartsWith("mailto:"))
        {
            Xamarin.Essentials.Email.ComposeAsync("Subject", e.Url);
        }
    }

Any ideas


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>