title: Prevent WebView from loading URL in Android (React Native)
body: <p>Currently, <a href="https://facebook.github.io/react-native/docs/webview.html#onshouldstartloadwithrequest" rel="noreferrer">OnShouldStartLoadWithRequest</a> is only supported on iOS. <a href="https://github.com/facebook/react-native/pull/6478" rel="noreferrer">A PR to add support for this on Android</a> was closed. If a WebView on Android tries to open a custom URL scheme, <a href="https://github.com/facebook/react-native/issues/10055" rel="noreferrer">the app will crash</a> -- which is causing my app to crash as well.</p>
  
  <p>The app I'm working on needs to intercept a WebView attempting to open a custom URL scheme and cancel it before opening that URL (which, on iOS, returning <code>false</code> on <code>OnShouldStartLoadWithRequest</code> is a great way to do that).</p>
  
  <p>What's the best way to do this on Android?</p>
  
  <p>I want this code to work:</p>
  
  <pre><code>        &lt;WebView
              ref={WEBVIEW_REF} 
              source={{uri: INITIAL_URI}}
              onShouldStartLoadWithRequest={this.onShouldStartLoadWithRequest}
              style={{width, height: height - navBarHeight, backgroundColor: "#fff"}}
          /&gt;
  </code></pre>
  
  <hr>
  
  <pre><code> onShouldStartLoadWithRequest(navigator) {
      if (navigator.url.indexOf(INTERCEPT_URL) === -1) {
          return true;
      }    
      return false;
    }
  </code></pre>
  
  <p>I'm personally okay with pretty much anything that works -- including modifying <code>ReactWebViewManager.java</code> manually. I just need to get this out the door.</p>