title: Phonegap device is undefined on both android and iOS
body: <p>While using the Phonegap platform I've ran in to a problem. When trying to access any of the device strings, e.g. device.name or device.platform, I get as value undefined. This occurs on both iOS and Android. I've set the permissions for Android in both the ApplicationManifest and the config.</p>
  <p>While doing research into the problem i found that the problem could be the the device functionality will only be available after about 1 to 3 seconds. I've ran some test, set a timeout at 10 seconds or even perform the action manually via onClick at different times (up to several minutes), but i keep getting the undefined value.</p>
  <p>I've tried window.device.name instead of device.name, same result.</p>
  <p>Does anyone have a clue why this is happening?</p>
  <p>Running Phonegap 2.3.0 on iOS 6.0.2 and Android 4.1.2</p>
  <p>Code:</p>
  <pre><code>$('#deviceName').html('Name: ' + device.name);
  $('#devicePlatform').html('Platform: ' + device.platform);
  $('#devicePlatformVersion').html('Version: ' + device.version);
  </code></pre>
  <p>Full Code <a href="http://jsfiddle.net/YpMQv/" rel="nofollow noreferrer">here</a></p>
  <p>Your help is mush appreciated!</p>