title: Web View Opening in the Browser
body: <p>I know this question asked many times. But that is not solving my problem. Pls check in my  mainactivity.java file </p>
  
  <pre><code>public class MainActivity extends Activity {
  
      private WebView webView = null;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
  
  
  
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
  
          this.webView = (WebView) findViewById(R.id.webview);
          WebSettings webSettings = webView.getSettings();
          webSettings.setJavaScriptEnabled(true);
  
          WebViewClientImpl webViewClient = new WebViewClientImpl(this);
          webView.setWebViewClient(webViewClient);
  
  
  
          webView.loadUrl("http://doopme.co.in/recharge/b2b/app");
      }
  
  
      @Override
      public boolean onKeyDown(int keyCode, KeyEvent event) {
          if ((keyCode == KeyEvent.KEYCODE_BACK) &amp;&amp; this.webView.canGoBack()) {
              this.webView.goBack();
              return true;
          }
  
          return super.onKeyDown(keyCode, event);
      }
  
  }
  </code></pre>
  
  <p>I am not getting any error with the following code but when when i click on it its opening the browser. After some google search, i found that i need to change this line to <code>webView.setWebViewClient(webViewClient);</code> to <code>webView.setWebViewClient(new WebViewClientImpl(this));</code> but I am getting an error.</p>