Is it possible to disable deep linking to other app, for instance if I have amazon installed on my device and open an amazon url with the web view it's pushing me to the amazon app, however I would like to open the amazon website inside the web view ?
Thanks for the help
I was having a similar problem when WebView was trying to open plaidlink://* and I wasn't able to control it. And I noticed that if you add the 3rd party protocol to the originWhitelist, you'd be able to control it inside the onShouldStartLoadWithRequest function:
Something like:
<WebView
source={{ uri: generateLinkInitializationURL() }}
onShouldStartLoadWithRequest={request => {
if (request.url.startsWith('plaidlink')) {
...
return false;
}
return true;
}}
originWhitelist={['https://*', 'plaidlink://*']}
/>
The workaround provided by @gaykov worked for me. I used it to disable mailto: links found in a web view.
Hello 馃憢, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like _still searching for solutions_ and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Most helpful comment
I was having a similar problem when WebView was trying to open
plaidlink://*and I wasn't able to control it. And I noticed that if you add the 3rd party protocol to theoriginWhitelist, you'd be able to control it inside theonShouldStartLoadWithRequestfunction:Something like: