0

From the React Native WebView to be able to open the related platform of Deep Link Scheme.
For example:
When the website I am viewing is trying to trigger another app.

 <WebView
          style={styles.container}
          originWhitelist={['*']}
          bounces={false}
          allowFileAccess={true}
          domStorageEnabled={true}
          javaScriptEnabled={true}
          geolocationEnabled={true}
          allowFileAccessFromFileURLS={true}
          allowUniversalAccessFromFileURLs={true}
          onNavigationStateChange={onNavigationStateChange}
          source={{
            uri:
              'http://onelink.to/6vdhky',
          }}
        />

https://github.com/react-native-community/react-native-webview/issues/750 https://github.com/react-native-webview/react-native-webview/pull/1136

image ref one
image ref two

2 Answers 2

1

I tried Linking.sendIntent() and Editing shouldOverrideUrlLoading() function in RNCWebViewManager.java but didn’t make it work. I finally ended up with https://github.com/lucasferreira/react-native-send-intent#readme Here’s my code like:

  onShouldStartLoadWithRequest={(request) => {
          const { url } = request;
          if (
            url.startsWith('intent://') &&
            url.includes('scheme=kbzpay') &&
            Platform.OS === 'android'
          ) {
            SendIntentAndroid.openChromeIntent(url);
            return false;
          }

          return false;
        }}
-1

VAT/BTW number (optional) Plus3dhedset VAT/BTW number must be in NL123456789B12 format. https://domains.google.com/registrar?favorites=0e70b499-a0f1-4bc6-850a-793c6f8392c7

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.