You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
excuse me sir, permission to ask,
I'm just learning flutter and am trying to make an application using package _inappwebview & url_launcher,
Well, I'm having trouble trying to handle mailto, tel, etc.
Now when the link is clicked (eg href=tel:), it does exit the application but why does it go to the chrome browser (opens the webview url) instead of going to the phone.
Can anyone help me to tell where is my error?
body: InAppWebView(
initialUrlRequest: URLRequest(url: Uri.parse("YOUR_INITIAL_URL")),
initialOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
javaScriptEnabled: true,
// Other options...
),
),
onWebViewCreated: (controller) {
webView = controller;
},
onLoadStart: (controller, url) async {
// Handle loading start event
print("WebView is starting to load: $url");
},
shouldOverrideUrlLoading: (controller, navigationAction) async {
var uri = navigationAction.request.url!;
// Check if the URL is for Gmail
if (uri.host.contains('mail.google.com')) {
// Open Gmail URL in the WebView
return NavigationActionPolicy.ALLOW;
}
// Check if the URL is for Facebook
else if (uri.host.contains('facebook.com')) {
// Open Facebook URL in the WebView
return NavigationActionPolicy.ALLOW;
}
// For any other URLs like tel, allow them to load in the WebView
return NavigationActionPolicy.ALLOW;
},
),
excuse me sir, permission to ask,
I'm just learning flutter and am trying to make an application using package _inappwebview & url_launcher,
Well, I'm having trouble trying to handle mailto, tel, etc.
Now when the link is clicked (eg href=tel:), it does exit the application but why does it go to the chrome browser (opens the webview url) instead of going to the phone.
Can anyone help me to tell where is my error?
My full code example can be seen here:
The text was updated successfully, but these errors were encountered: