title: Issue in loading URL in webview android
body: <p>I need to show a login webpage link in webview and the link is something like below</p>
  
  <pre><code>url = "https://test-dev.test.com/as/authorization.oauth2?client_id=com.test.td&amp;response=code&amp;value=id test mail&amp;redirect_uri=com.test.ap://oauth2/test"; 
  </code></pre>
  
  <p>[Modifed the actual URL with different names]</p>
  
  <p>On this page, we have to enter username and password.  Clicking on login will take you to OTP screen, after entering the OTP result will be a url response and from this I need to read the code.  Using this code I have to make a request to get the authentication token for the session.  For token request, response will be Json.</p>
  
  <p>Now I need help in resolving the below:</p>
  
  <ol>
  <li>Currently its opening in browser and not in webview.  But other links are opening in webview within the app except the above link.   </li>
  <li>Which is the call back method for handling response from this transaction.</li>
  </ol>
  
  <p>Below is my code:</p>
  
  <pre><code>private WebView webView;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      webView = (WebView) findViewById(R.id.webView);
      webView.setWebViewClient(new MyWebViewClient());
      WebSettings settings = webView.getSettings();
      settings.setJavaScriptEnabled(true);
      webView.loadUrl(getAuthorizationURL());
      webView.setHorizontalScrollBarEnabled(false);
      webView.setWebContentsDebuggingEnabled(true);
      //  webView.addJavascriptInterface(new MyJavaScriptInterface(this), "HtmlViewer");    
  }
  
  
      private String getAuthURL() {
      Uri.Builder builder = new Uri.Builder();
      builder.scheme("https")
              .authority("test-dev.test.com")
              .appendPath("ta/authorization.oauth2")
              .appendQueryParameter("client_id", "com.test.td")
              .appendQueryParameter("response", "code")
              .appendQueryParameter("value", "id test mail").appendQueryParameter("redirect_uri", "com.test.ap://oauth2/test")
  
      String url = Uri.decode(builder.build().toString());
  
      //url = "https://www.google.com/";
      // url = "https://developers.google.com/webmaster-tools/search-console-api/about";
  
      return url;
  }
  
  
   private class MyWebViewClient extends WebViewClient {
      @Override
      public boolean shouldOverrideUrlLoading(WebView webView, String url) {
  
          System.out.println(" shouldOverrideUrlLoading :============ " + Uri.parse(url).getHost() + " url " + url);
  
          //            if(url.contains("dev.test.com")){
          //                webView.loadUrl(url);
          //                return false;
          //            }
          Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
          startActivity(i);
          return true;
      }
  }
  </code></pre>