Issue
Good evening,
I've been trying to solve the problem with clicking on <tel:....link in webview for a few days now.
I have tried several manuals but none of them work. Can you please advise me?
Thank you
Solution
Use the Webview.OnNavigating
event. Something like this should work:
Page.xaml.cs
private void WebView_OnNavigating(object sender, WebNavigatingEventArgs navigationEvent) {
if (navigationEvent.Url.StartsWith("tel:")) {
navigationEvent.Cancel = true;
Xamarin.Essentials.Launcher.OpenAsync(navigationEvent.Url);
}
}
Page.xaml
<WebView Navigating="WebView_OnNavigating" />
Answered By - Simon Corcos
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.