Closed Trend74X closed 3 years ago
That's the expected behavior. You need to implement it by yourself. People may get confused thinking that a WebView is a Browser (such as Chrome, Firefox, Safari, etc.). It is not.
WebView: https://www.pcmag.com/encyclopedia/term/webview Web Browser: https://www.pcmag.com/encyclopedia/term/web-browser
To achieve what you need, you need to use the shouldOverrideUrlLoading
event (to be able to listen this event, you need to enable the useShouldOverrideUrlLoading
webview option).
Also, you can use the url_launcher plugin to open the dialpad.
Here is an example:
shouldOverrideUrlLoading: (controller, navigationAction) async {
var uri = navigationAction.request.url!;
if (uri.scheme == 'tel') {
if (await canLaunch(url)) {
// Launch the App
await launch(
url,
);
// and cancel the request
return NavigationActionPolicy.CANCEL;
}
}
return NavigationActionPolicy.ALLOW;
},
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.
Description
I want to redirect to dialpad with given number when I click on telephone icon/ somewhere. My webview code is coded in angular and it redirects into dialpad when it runs in chrome, but shows error while running in inappwebview. I dont think its already implemented in inappwebview .
Issue it shows is net::ERR_UNKNOWN_URL_SCHEME