title: phonegap plugin loadUrl from execute function
body: <p>I am trying to implement an error screen when a certain event is triggered in my js code. Since the error page is local, my attempt to set <code>window.location.href = 'file:///android_assets/www/error.html'</code> throws an error indicating cannot load local resource.</p>
  
  <p>So I am trying to create a plugin in android and doing the following:</p>
  
  <pre><code>    public PluginResult execute(final String action, final JSONArray data, final String callBackId) {
  //      final DroidGap currentCtx = (DroidGap) ctx.getContext();
  
          final Context currentCtx = cordova.getActivity();
          MainActivity ma = (MainActivity) currentCtx;
          ma.loadUrl("file:///android_assets/www/error.html");
  
          PluginResult result = null;
          return result;
      }
  </code></pre>
  
  <p>The problem is this code doesn't load the URL. I am not sure if this is the right way of calling. Any insights please?</p>
  
  <p>I see an error like: 
  <code>08-16 01:08:48.974: I/Web Console(730): JSCallback Error: Request failed. at file:///android_asset/www/cordova-2.0.0.js:3698</code></p>