Deep Link cannot be intercepted in method onShouldStartLoadWithRequest
See original GitHub issueBug description: Deep Link cannot be intercepted in method onShouldStartLoadWithRequest. Although it returned false, the application was called up.
<WebView
...
onShouldStartLoadWithRequest = {this._onShouldStartLoadWithRequest.bind(this)}
/>
_onShouldStartLoadWithRequest = (event) => {
let url =event.url;
if(url.indexOf("alipay://")>-1 || url.indexOf("alipays://")>-1) {
Log.info("-----------------------------------_onShouldStartLoadWithRequest return false url = " + url);
return false;
}
return true;
}
To Reproduce:
Expected behavior: I need to intercept deep link and deal with them myself.
Screenshots/Videos:
Environment:
- OS: Android
- OS version: Android 8.0 Oreo
- react-native version: 0.59.8
- react-native-webview version: 5.12.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:9
Top Results From Across the Web
Deep Link cannot be intercepted in method ... - GitHub
Bug description : Deep Link cannot be intercepted in method onShouldStartLoadWithRequest. Although it returned false, the application was called ...
Read more >React Native - open links in browser - Stack Overflow
I call the browser to open on onNavigationStateChange when the URL changes. The thing now is that the WebView still continues to process...
Read more >Implementing Deep Linking in React Native apps - VentureDevs
This article complements the Webinar on Deep Linking that can be found ... to try to intercept information transmitted to your application via...
Read more >Deep Linking Your React Native App | by Nader Dabit - Medium
In this post, I'll quickly walk through how to add deep linking to a React Native app for both iOS and Android using...
Read more >Your Deep Links Might Be Broken: Web Intents and Android 12
In practice, this means the Android system will securely verify ownership of the link you are trying to process. The system uses a...
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
someone mentioned in other ticket that you should whitelist your scheme first, and then it will work
@Overtorment tried with your suggestion. It works, Thanks