Exemplo n.º 1
0
#pragma warning disable CS0672 // Member overrides obsolete member
            public override bool ShouldOverrideUrlLoading(Android.Webkit.WebView view, string url)
#pragma warning restore CS0672 // Member overrides obsolete member
            {
                if (url.StartsWith(Uri.UriSchemeMailto, true, CultureInfo.InvariantCulture))
                {
                    _webView.CreateAndLaunchMailtoIntent(view.Context, url);
                    return(true);
                }

                var args = new WebViewNavigationStartingEventArgs()
                {
                    Uri = new Uri(url)
                };

                _webView.NavigationStarting?.Invoke(_webView, args);

                return(args.Cancel);
            }