title: Hide splash screen on android once phonegap site has loaded
body: <p>I have a website that uses media queries to look good on mobiles, I wrapped this up in phonegap so I can have it as an application too. I have set super.loadUrl to my site and this works, I also have a working splash screen that I want to keep up until the site has loaded. I came across <a href="http://simonmacdonald.blogspot.co.uk/2012/04/phonegap-android-splashscreen-just-got.html" rel="nofollow">this blog post</a> and followed the instructions. It works if I am super.loadUrl to index.html (the app homepage) but not if I loadUrl of my actual site.</p>
  
  <p>Splash screen code (main java file)</p>
  
  <pre><code>super.setIntegerProperty("splashscreen", R.drawable.splash);
  super.loadUrl("My External Site Url", 20000);
  </code></pre>
  
  <p>Index.html code (this works if i loadUrl to it, but I want to loadUrl to my site)</p>
  
  <pre><code>document.addEventListener("deviceready", onDeviceReady, false);
  function onDeviceReady() {
      navigator.splashscreen.hide();
  }
  </code></pre>
  
  <p>However, when I use the above code (and include cordova.js) in my external html file, it doesn't recognise onDeviceReady, so the splash screen doesn't hide itself, and I'm stuck waiting 20 seconds. </p>
  
  <p>Am I missing something? Am I even allowed to use onDeviceReady from an external html file (e.g. one that is not build into the app) or should this work and I am just referencing cordova wrong?</p>