mailto: and tel: links do not work in webview
See original GitHub issueBug description:
If the page opened in the webview has any mailto: or tel: links, pressing them causes the webview to return the generic android page and fire the error events.
I believe the error is: net::ERR_UNKNOWN_URL_SCHEME
(android) and unsupported URL
(iOS)
Happens on both iOS and Android
To Reproduce:
Load any page with mailto and/or tel links.
Expected behavior:
Other schemas should be working
Screenshots/Videos:
Environment:
- OS: Android and iOS
- OS version: 8.1, 10, 13.2.3
- react-native version: 0.61.5
- react-native-webview version: 7.6.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:29 (2 by maintainers)
Top Results From Across the Web
MailTo does not working in Android WebView - Stack Overflow
I solve my issue by using this : public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url.startsWith("tel:")) { Intent ...
Read more >Handling 'mailto' And 'tel' Links Inside Android ... - C# Corner
Today, we will see how to integrate those wrappers into our Android app to respond to a user clicking mailto and tel links....
Read more >Handling 'mailto' and 'tel' Links inside Android WebView
By inspecting WebView class you can find that there's no direct way to subscribe to events of user clicking a link or navigating...
Read more >Proper way to do mailto: and tel: links | Telerik Forums
I've got a Kendo UI Mobile listview and each item has a phone number and email address, both of which should be clickable/touchable...
Read more >WebView mailto links don't work on android - MSDN
Figured this out myself. In the android project on the MainActivity.cs I added code below. Would also need to handle the other mailto...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Visakeswaran not really, I just handled the links case by case with the
onShouldStartLoadWithRequest
prop and something like this:Does this still work? We found that when we open an
intent://
link,onShouldStartLoadWithRequest
prop is not called anymore (An errorCan't open url: intent://xxx
is displayed instead)It used to work on 5.x.x 😢