title: Open URL from WebView in browser
body: <p>I need to open the URL in default browser of the phone (not in the application's <code>WebView</code>). Below is my code, but it launches the URL in <code>WebView</code>.</p>
  
  <p>How can I open the URL in the default browser?</p>
  
  <p><strong>Activity2.java</strong></p>
  
  <pre><code>public class Activity2 extends Activity {
      private class MyWebViewClient extends WebViewClient {
          @Override
          public boolean shouldOverrideUrlLoading(WebView view, String url) {
              view.loadUrl(url);
              return true;
          }
      }
  
      WebView webview;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_webview);
  
        webview=(WebView)findViewById(R.id.webView1);
        webview.setWebViewClient(new MyWebViewClient());
        openURL();
      }
  
      /** Opens the URL in a browser */
      private void openURL() {
        webview.loadUrl("http://www.XX.org");
        webview.requestFocus();
      }
  }
  </code></pre>