title: Load second URL if first is not present in android webView
body: <p>I was making a webview application for my local network. I have two static IPs. All I want to do is to load second if 1st one is down. (Because one of them is always running).</p>
  
  <p>What I'm doing is to check it in <code>onRecievedError()</code> function and change the URL value, then call the <code>onCreate()</code> again like this.</p>
  
  <pre><code>public void onReceivedError(WebView view, int errorCode, String description, String failingUrl){
      Toast.makeText(getApplicationContext(), "Failed loading app!", Toast.LENGTH_SHORT).show();
      url1="http://192.168.43.XXX";  //here XXX is used just to hide my IP from public
      onCreate(new Bundle());
  }
  </code></pre>
  
  <p>the <code>onCreate()</code> method has to render the new URL but my application closes itself upon this call. Why is this so?
  Please help because I'm a beginner.</p>